Advertisement
This is comment for paste
Операторы LEFT OUTER JOIN и RIGHT OUTER JOIN, задача 2
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- либо немного изменить
- SELECT EXTRACT(YEAR FROM CAST(i.invoice_date AS DATE)) AS year_of_invoice,
- COUNT(DISTINCT t.name) AS unique_track_count
- FROM invoice AS i
- LEFT JOIN invoice_line AS il ON i.invoice_id = il.invoice_id
- LEFT JOIN track AS t ON il.track_id = t.track_id
- GROUP BY year_of_invoice;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement