From a8d1667acf7fcba30ee5dd2c7c70d1d1be2640e0 Mon Sep 17 00:00:00 2001 From: Dan White Date: Fri, 23 Dec 2022 23:25:23 -0600 Subject: [PATCH] some analysis --- observations_analysis.sqbpro | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 observations_analysis.sqbpro diff --git a/observations_analysis.sqbpro b/observations_analysis.sqbpro new file mode 100644 index 0000000..f793538 --- /dev/null +++ b/observations_analysis.sqbpro @@ -0,0 +1,27 @@ +
INSERT OR REPLACE INTO times_index + SELECT id, strftime("%s", start), strftime("%s", end) +FROM observations +WHERE strftime("%s", start) <= strftime("%s", end);CREATE VIRTUAL TABLE times_index + USING rtree(id, start, end);select observer, count(vetted_status) from observations +WHERE vetted_status = "unknown" +GROUP BY observer +ORDER BY observer;select ground_station, norad_cat_id, count(id) from observations +GROUP BY ground_station, norad_cat_id +ORDER BY ground_station, count(id);create index if not exists gs_norad +on observations(ground_station, norad_cat_id); + +create index if not exists gs_index +on observations(ground_station); + +create index if not exists norad_index +on observations(norad_cat_id); + +create index if not exists observer_index +on observations(observer); + +create index if not exists observer_gs_index +on observations(observer, ground_station); +select observer, ground_station, count(id) from observations +GROUP BY observer, ground_station +ORDER BY observer, count(id) DESC, ground_station; +
-- 2.25.1