From 1f2f1b5ba30108564f161e74950644097266a3bb Mon Sep 17 00:00:00 2001 From: Jesse Mortenson Date: Mon, 4 Nov 2024 23:24:49 -0600 Subject: [PATCH] Query output: add vote_sources view --- docs/data/query-scraper-output-data.md | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/docs/data/query-scraper-output-data.md b/docs/data/query-scraper-output-data.md index 15c29a0..17b4469 100644 --- a/docs/data/query-scraper-output-data.md +++ b/docs/data/query-scraper-output-data.md @@ -130,6 +130,13 @@ SELECT legislative_session, _id AS vote_id, unnest(counts, recursive := true) FROM vote_events; +CREATE VIEW vote_sources AS +SELECT legislative_session, + bill_identifier, + identifier AS vote_identifier, + _id AS vote_id, + unnest(sources, recursive := true) +FROM vote_events; -- Events CREATE VIEW events AS