simplify subscribing/unsubscribing podcasts
[mygpo.git] / install / update-26.sql
blobcff5bf5bf9f26a9efaa42ec289d43b8dec0d6c04
2 -- it seems episode_toplist need to be re-created if the underlying view changes
4 DROP VIEW IF EXISTS episode_toplist;
6 CREATE VIEW episode_toplist AS
7     SELECT episode_id AS id, episode_id, count(episode_id) AS listeners
8     FROM recent_unique_plays
9     GROUP BY episode_id
10     ORDER BY listeners;