Project

General

Profile

1
SELECT '# projects' AS ___;
2
SELECT count(*) AS count FROM project;
3

    
4
SELECT 'projects' AS ___;
5
SELECT projectname AS project FROM project ORDER BY project;
6

    
7
SELECT E'each project\'s # plots' AS ___;
8
SELECT projectname AS project, count(*) AS plots_count
9
FROM project
10
JOIN plotevent USING (project_id)
11
GROUP BY project
12
ORDER BY project
13
;
14

    
15
SELECT '# plots' AS ___;
16
SELECT count(*) AS count FROM plot;
17

    
18
SELECT '# plot observations' AS ___;
19
SELECT count(*) AS count FROM plotevent;
20

    
21
SELECT '1st methods' AS ___;
22
SELECT DISTINCT
23
    projectname AS project
24
    , stemSampleMethod AS method -- placeholder until we have a method field
25
FROM project
26
JOIN plotevent USING (project_id)
27
ORDER BY project, method
28
LIMIT 10;
29

    
30
SELECT '1st method narratives' AS ___;
31
SELECT DISTINCT
32
    projectname AS project
33
    , methodNarrative AS method_narrative
34
FROM project
35
JOIN plotevent USING (project_id)
36
ORDER BY project, method_narrative
37
LIMIT 10;
(3-3/3)