Persist umami sql queries and stuff
This commit is contained in:
@@ -0,0 +1,16 @@
|
||||
-- Type returned by the crosstab function
|
||||
CREATE TYPE weekly_sim_submit_count_crosstab AS (
|
||||
group_name text,
|
||||
transport bigint,
|
||||
lice bigint,
|
||||
virus bigint,
|
||||
watercontact bigint,
|
||||
sedimentation bigint
|
||||
);
|
||||
|
||||
-- Cross tab function we can call on the materialized view of weekly submit counts
|
||||
CREATE OR REPLACE FUNCTION crosstab_weekly_sim_submit_count(text)
|
||||
RETURNS setof weekly_sim_submit_count_crosstab
|
||||
AS '$libdir/tablefunc','crosstab' LANGUAGE C STABLE STRICT;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user