Revision 12538
Added by Aaron Marcuse-Kubitza almost 11 years ago
trunk/inputs/SALVIAS/validations.sql | ||
---|---|---|
57 | 57 |
|
58 | 58 |
CREATE VIEW _plots_05_list_of_plot_codes_by_project AS |
59 | 59 |
SELECT p.project_name, |
60 |
(pm."SiteCode")::text AS "SiteCode"
|
|
60 |
(pm."SiteCode")::text AS plot_code
|
|
61 | 61 |
FROM (projects p |
62 | 62 |
JOIN "plotMetadata" pm ON ((p.project_id = pm.project_id))); |
63 | 63 |
|
... | ... | |
68 | 68 |
|
69 | 69 |
CREATE VIEW _plots_06_list_of_plots_with_stem_measurements AS |
70 | 70 |
SELECT DISTINCT p.project_name, |
71 |
(pm."SiteCode")::text AS "SiteCode"
|
|
71 |
(pm."SiteCode")::text AS plot_code
|
|
72 | 72 |
FROM (((projects p |
73 | 73 |
JOIN "plotMetadata" pm ON ((p.project_id = pm.project_id))) |
74 | 74 |
JOIN "plotObservations" po ON ((pm."PlotID" = po."PlotID"))) |
... | ... | |
83 | 83 |
|
84 | 84 |
CREATE VIEW _plots_07_list_of_plots_with_counts_of_individuals_per_species AS |
85 | 85 |
SELECT DISTINCT p.project_name, |
86 |
(pm."SiteCode")::text AS "SiteCode"
|
|
86 |
(pm."SiteCode")::text AS plot_code
|
|
87 | 87 |
FROM ((projects p |
88 | 88 |
JOIN "plotMetadata" pm ON ((p.project_id = pm.project_id))) |
89 | 89 |
JOIN "plotObservations" po ON (((pm."PlotID" = po."PlotID") AND (po."NoInd" > 1)))) |
... | ... | |
97 | 97 |
|
98 | 98 |
CREATE VIEW _plots_08_list_of_plots_which_use_percent_cover AS |
99 | 99 |
SELECT DISTINCT p.project_name, |
100 |
(pm."SiteCode")::text AS "SiteCode"
|
|
100 |
(pm."SiteCode")::text AS plot_code
|
|
101 | 101 |
FROM ((projects p |
102 | 102 |
JOIN "plotMetadata" pm ON ((p.project_id = pm.project_id))) |
103 | 103 |
JOIN "plotObservations" po ON (((pm."PlotID" = po."PlotID") AND (po.cover_percent IS NOT NULL)))) |
... | ... | |
111 | 111 |
|
112 | 112 |
CREATE VIEW _plots_09_list_of_plots_which_use_line_intercept AS |
113 | 113 |
SELECT DISTINCT p.project_name, |
114 |
(pm."SiteCode")::text AS "SiteCode"
|
|
114 |
(pm."SiteCode")::text AS plot_code
|
|
115 | 115 |
FROM ((projects p |
116 | 116 |
JOIN "plotMetadata" pm ON ((p.project_id = pm.project_id))) |
117 | 117 |
JOIN "plotObservations" po ON (((pm."PlotID" = po."PlotID") AND (po.intercept_cm IS NOT NULL)))) |
Also available in: Unified diff
fix: inputs/SALVIAS/validations.sql: renamed SiteCode to plot_code to match output queries