Last change
on this file was bfca48b, checked in by ManuelTrajcev <manueltrajcev7@…>, 3 weeks ago |
+4 views with controlers and templates
|
-
Property mode
set to
100644
|
File size:
270 bytes
|
Line | |
---|
1 | CREATE VIEW avg_price_per_artist AS
|
---|
2 | SELECT
|
---|
3 | ar.name,
|
---|
4 | COALESCE( ROUND(avg(t.unit_price), 2)::text, 'not enogu data') as avg_price_per_track
|
---|
5 | FROM artist ar
|
---|
6 | left join album a on ar.artist_id = a.artist_id
|
---|
7 | left join track t on a.album_id = t.album_id
|
---|
8 | group by ar.name |
---|
Note:
See
TracBrowser
for help on using the repository browser.