Moved project directories and files to an empty local repo

This commit is contained in:
Dave Morriss committed 2024-06-04 16:35:44 +01:00
1 parent 2d2b937a9b
commit 38abbcdd39
271 files changed
+55348

No files matched your search

+32
View File
@@ -0,0 +1,32 @@
/* -----------------------------------------------------------------------------
* Find all new hosts who joined in the last year (ignoring those with queued
* shows in the future)
*
*/
SELECT h.hostid,
h.host,
min(e.date) AS joindate,
count(e.id) AS COUNT
FROM eps e
JOIN hosts h ON e.hostid = h.hostid
GROUP BY h.hostid
HAVING min(e.date) >= (curdate() - INTERVAL 364 DAY)
AND min(e.date) <= curdate()
ORDER BY min(e.date);
/* -----------------------------------------------------------------------------
* Total shows produced by the new hosts in the past year
*/
SELECT sum(COUNT) AS total_shows
FROM
(SELECT h.hostid,
h.host,
min(e.date) AS joindate,
count(e.id) AS COUNT
FROM eps e
JOIN hosts h ON e.hostid = h.hostid
GROUP BY h.hostid
HAVING min(e.date) >= (curdate() - INTERVAL 364 DAY)
AND min(e.date) <= curdate()
ORDER BY min(e.date)) src;