Project

General

Profile

1 10245 aaronmk
SELECT util.search_path_append('util');
2 7247 aaronmk
3 10245 aaronmk
SELECT create_if_not_exists($$CREATE INDEX "Specimen.acronym" ON $$||:table_str||$$ ("dwc_terms_institutionCode")$$);
4
5 7247 aaronmk
-- Remove institutions that we have direct data for
6
DELETE FROM :table
7
WHERE "dwc_terms_institutionCode" IN (
8
      'MO'
9
    , 'NY'
10
)
11
/* list obtained using:
12 9501 aaronmk
SELECT DISTINCT dataprovider
13 7247 aaronmk
FROM sourcelist
14 9501 aaronmk
JOIN provider_count ON provider_count.dataprovider = sourcelist.name
15 7247 aaronmk
WHERE source_id = source_by_shortname('SpeciesLink')
16 9501 aaronmk
ORDER BY dataprovider
17 7247 aaronmk
*/
18
;