Revision 1297
Added by Aaron Marcuse-Kubitza almost 13 years ago
specimens.ref.sql | ||
---|---|---|
13 | 13 |
SELECT '# binomials' AS ___; |
14 | 14 |
SELECT count(DISTINCT ScientificName) AS count FROM nybg_raw; |
15 | 15 |
|
16 |
/* |
|
17 |
SELECT DISTINCT CONCAT_WS(' ', Genus, Species) AS Species |
|
18 |
FROM nybg_raw |
|
19 |
WHERE Genus IS NOT NULL AND Species IS NOT NULL; |
|
16 |
SELECT 'collection codes' AS ___; |
|
17 |
SELECT DISTINCT CollectionCode AS collectioncode_dwc FROM nybg_raw; |
|
20 | 18 |
|
21 |
SELECT DISTINCT Genus AS Genera |
|
22 |
FROM nybg_raw |
|
23 |
WHERE Genus IS NOT NULL; |
|
19 |
SELECT '# catalog numbers' AS ___; |
|
20 |
SELECT count(DISTINCT CatalogNumber) AS count FROM nybg_raw; |
|
24 | 21 |
|
25 |
SELECT DISTINCT Family as Families |
|
26 |
FROM nybg_raw |
|
27 |
WHERE Family IS NOT NULL; |
|
28 |
|
|
29 |
SELECT ScientificName, Genus, Species, Subspecies, ScientificNameAuthor |
|
30 |
FROM nybg_raw |
|
31 |
LIMIT 25; |
|
32 |
|
|
33 |
SELECT ScientificName, Genus, Species, Subspecies, ScientificNameAuthor |
|
34 |
FROM nybg_raw |
|
35 |
WHERE Subspecies IS NOT NULL |
|
36 |
LIMIT 15; |
|
37 |
|
|
38 |
SELECT InstitutionCode, COUNT(*) AS records |
|
39 |
FROM nybg_raw |
|
40 |
GROUP BY InstitutionCode; |
|
41 |
|
|
42 |
SELECT DISTINCT CollectionCode |
|
43 |
FROM nybg_raw; |
|
44 |
|
|
22 |
/* |
|
45 | 23 |
SELECT DISTINCT Country, StateProvince, County |
46 | 24 |
FROM nybg_raw |
47 | 25 |
LIMIT 25; |
Also available in: Unified diff
specimens verification: Added collection codes and # catalog numbers tests