SELECT
Customer.FirstName,
Customer.LastName,
Invoice.CustomerId,
Invoice.BillingCountry,
Invoice.InvoiceId,
Invoice.BillingCity,
SUM(Invoice.Total) AS Total
FROM
Customer
INNER JOIN
Invoice
ON
Customer.CustomerId = Invoice.CustomerId
GROUP BY
Invoice.InvoiceId
1. Write a query to select to compute total amount paid by each customer based on their BillingCountry and and BillingCity
2. Write a query that compute Unit Price for the track of all MediaType based MediaType Name
This one will join two tables Track and MediaType
3 Write a query that will display Total number of Artist based on their Album name
This will join 2 tables i.e Album and Artist
. Write a query that will sort Genre based on their track ID and playlist ID
This will join 3 tables, namely: PlaylistTrack, Track, and Genre
The main part is question 1-3 which I have already provided you sample answers for
The assignment (TMA) is just different context
knowledge in 1. ERD
2. Normalisation (4NF, BCNF)
3. SQL Statements (DDL, DML) is needed