neotoma
.ndb
Tables
(current)
Columns
Constraints
Relationships
Orphan Tables
Anomalies
Routines
datasettypecontrib(startperiod integer DEFAULT 0, endperiod integer DEFAULT 1)
Parameters
Name
Type
Mode
startperiod
integer
IN
endperiod
integer
IN
datasettype
character varying
TABLE
counts
bigint
TABLE
Definition
SELECT dst.datasettype, count(DISTINCT ds.datasetid) FROM ndb.datasets AS ds JOIN ndb.datasettypes AS dst ON dst.datasettypeid = ds.datasettypeid JOIN ndb.datasetsubmissions AS dss on dss.datasetid = ds.datasetid WHERE EXTRACT(year from AGE(NOW(), dss.submissiondate))*12 + EXTRACT(month from AGE(NOW(), dss.submissiondate)) BETWEEN startperiod and endperiod GROUP BY dst.datasettype