Moved project directories and files to an empty local repo

This commit is contained in:
Dave Morriss
2024-06-04 16:35:44 +01:00
parent 2d2b937a9b
commit 38abbcdd39
271 changed files with 55348 additions and 0 deletions

View File

@@ -0,0 +1,21 @@
-- View: eh_view
DROP VIEW IF EXISTS eh_view;
CREATE OR REPLACE VIEW eh_view AS
SELECT ep.episode_key,
ep.release_date,
ep.title,
ep.summary,
( SELECT string_agg(h2.host::text, '; '::text ORDER BY h2.host::text) AS string_agg
FROM hosts h2,
episodes_hosts_xref eh2
WHERE eh2.hosts_id = h2.id
GROUP BY eh2.episodes_id
HAVING eh2.episodes_id = ep.id) AS hosts
FROM episodes ep
GROUP BY ep.id
ORDER BY ep.id;
ALTER TABLE eh_view
OWNER TO hpradmin;