source: music/views/rank_list_artists.sql@ bfca48b

Last change on this file since bfca48b was bfca48b, checked in by ManuelTrajcev <manueltrajcev7@…>, 4 weeks ago

+4 views with controlers and templates

  • Property mode set to 100644
File size: 356 bytes
RevLine 
[bfca48b]1CREATE VIEW rank_list_artists AS
2 SELECT
3 (ar.name),
4 count(il.invoice_line_id)
5as num_invoices
6 FROM artist ar
7 left join album al on ar.artist_id = al.album_id
8 left join track tr on al.album_id = tr.album_id
9 left join invoice_line il on tr.track_id = il.track_id
10 group by ar.name
11 order by num_invoices desc
Note: See TracBrowser for help on using the repository browser.