Skip to content

m-tambo/chinook

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 

Repository files navigation

chinook

In this repo, I got to learn some basic SQL by interacting with the Chinook database (https://chinookdatabase.codeplex.com/)

ERD

I started off by mapping out all of the complex relationships in an ERD

chinook-erd

Queries

I then used the SQL language to make 27 different queries to return various data points. These can be found in the chinook-queries.sql file. I used DB browser to interact with the database.

Query Example

Which sales agent made the most in sales over all?

SELECT SUM(Invoice.Total) AS 'Total Sales', Employee.FirstName, Employee.LastName
FROM Invoice
JOIN Customer ON Invoice.CustomerId = Customer.CustomerId
JOIN Employee ON Customer.SupportRepId = Employee.EmployeeId
GROUP BY Employee.FirstName

Tech I utilized

sql_sqlite

images

About

making SQL queries to a database

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors