1 |
373
|
aaronmk
|
SELECT '# projects' AS ___;
|
2 |
371
|
aaronmk
|
SELECT count(*) AS count FROM project;
|
3 |
368
|
aaronmk
|
|
4 |
374
|
aaronmk
|
SELECT 'projects' AS ___;
|
5 |
|
|
SELECT projectname AS project FROM project ORDER BY project;
|
6 |
371
|
aaronmk
|
|
7 |
616
|
aaronmk
|
SELECT E'each project\'s # locations' AS ___;
|
8 |
|
|
SELECT projectname AS project, count(*) AS locations_count
|
9 |
371
|
aaronmk
|
FROM project
|
10 |
616
|
aaronmk
|
JOIN locationevent USING (project_id)
|
11 |
371
|
aaronmk
|
GROUP BY project
|
12 |
|
|
ORDER BY project
|
13 |
|
|
;
|
14 |
374
|
aaronmk
|
|
15 |
616
|
aaronmk
|
SELECT '# locations' AS ___;
|
16 |
|
|
SELECT count(*) AS count FROM location;
|
17 |
376
|
aaronmk
|
|
18 |
1083
|
aaronmk
|
SELECT '# location events' AS ___;
|
19 |
616
|
aaronmk
|
SELECT count(*) AS count FROM locationevent;
|
20 |
377
|
aaronmk
|
|
21 |
|
|
SELECT '1st methods' AS ___;
|
22 |
|
|
SELECT DISTINCT
|
23 |
|
|
projectname AS project
|
24 |
1083
|
aaronmk
|
, plotmethod.name AS method
|
25 |
377
|
aaronmk
|
FROM project
|
26 |
616
|
aaronmk
|
JOIN locationevent USING (project_id)
|
27 |
1083
|
aaronmk
|
JOIN plotmethod USING (plotmethod_id)
|
28 |
377
|
aaronmk
|
ORDER BY project, method
|
29 |
|
|
LIMIT 10;
|
30 |
|
|
|
31 |
1083
|
aaronmk
|
SELECT '1st observation measures' AS ___;
|
32 |
377
|
aaronmk
|
SELECT DISTINCT
|
33 |
|
|
projectname AS project
|
34 |
1083
|
aaronmk
|
, method.observationmeasure AS observationmeasure
|
35 |
377
|
aaronmk
|
FROM project
|
36 |
616
|
aaronmk
|
JOIN locationevent USING (project_id)
|
37 |
1083
|
aaronmk
|
JOIN plotmethod USING (plotmethod_id)
|
38 |
|
|
JOIN method USING (method_id)
|
39 |
|
|
ORDER BY project, observationmeasure
|
40 |
377
|
aaronmk
|
LIMIT 10;
|