Revision 616
Added by Aaron Marcuse-Kubitza almost 13 years ago
verify.sql | ||
---|---|---|
4 | 4 |
SELECT 'projects' AS ___; |
5 | 5 |
SELECT projectname AS project FROM project ORDER BY project; |
6 | 6 |
|
7 |
SELECT E'each project\'s # plots' AS ___;
|
|
8 |
SELECT projectname AS project, count(*) AS plots_count
|
|
7 |
SELECT E'each project\'s # locations' AS ___;
|
|
8 |
SELECT projectname AS project, count(*) AS locations_count
|
|
9 | 9 |
FROM project |
10 |
JOIN plotevent USING (project_id)
|
|
10 |
JOIN locationevent USING (project_id)
|
|
11 | 11 |
GROUP BY project |
12 | 12 |
ORDER BY project |
13 | 13 |
; |
14 | 14 |
|
15 |
SELECT '# plots' AS ___;
|
|
16 |
SELECT count(*) AS count FROM plot;
|
|
15 |
SELECT '# locations' AS ___;
|
|
16 |
SELECT count(*) AS count FROM location;
|
|
17 | 17 |
|
18 |
SELECT '# plot observations' AS ___;
|
|
19 |
SELECT count(*) AS count FROM plotevent;
|
|
18 |
SELECT '# location observations' AS ___;
|
|
19 |
SELECT count(*) AS count FROM locationevent;
|
|
20 | 20 |
|
21 | 21 |
SELECT '1st methods' AS ___; |
22 | 22 |
SELECT DISTINCT |
23 | 23 |
projectname AS project |
24 | 24 |
, stemSampleMethod AS method -- placeholder until we have a method field |
25 | 25 |
FROM project |
26 |
JOIN plotevent USING (project_id)
|
|
26 |
JOIN locationevent USING (project_id)
|
|
27 | 27 |
ORDER BY project, method |
28 | 28 |
LIMIT 10; |
29 | 29 |
|
... | ... | |
32 | 32 |
projectname AS project |
33 | 33 |
, methodNarrative AS method_narrative |
34 | 34 |
FROM project |
35 |
JOIN plotevent USING (project_id)
|
|
35 |
JOIN locationevent USING (project_id)
|
|
36 | 36 |
ORDER BY project, method_narrative |
37 | 37 |
LIMIT 10; |
Also available in: Unified diff
inputs/SALVIAS/verify: Updated to use new names for renamed tables