Skip to content

Commit cd7b5b8

Browse files
committed
add view with listened count per hooman
1 parent 6b69b91 commit cd7b5b8

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
CREATE VIEW listened_count AS
2+
SELECT hooman.lastfm_user,
3+
COUNT(listened.id) as count
4+
FROM listened
5+
LEFT JOIN hooman ON listened.hooman_id = hooman.id
6+
GROUP BY hooman.lastfm_user
7+
ORDER BY count DESC
8+
;

0 commit comments

Comments
 (0)