In this repo, I got to learn some basic SQL by interacting with the Chinook database (https://chinookdatabase.codeplex.com/)
I started off by mapping out all of the complex relationships in an ERD
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.
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


