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 # locations' AS ___;
8
SELECT projectname AS project, count(*) AS locations_count
9
FROM project
10
JOIN locationevent USING (project_id)
11
GROUP BY project
12
ORDER BY project
13
;
14

    
15
SELECT '# locations' AS ___;
16
SELECT count(*) AS count FROM location;
17

    
18
SELECT '# location observations' AS ___;
19
SELECT count(*) AS count FROM locationevent;
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 locationevent 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 locationevent USING (project_id)
36
ORDER BY project, method_narrative
37
LIMIT 10;
(3-3/3)