Database Access
Usage
SQL example queries
"SHOW TABLES;"
"DESC agro_pheno_def;
The identifiers of all stations with a name similar to "Geisenheim" can be retrieved with the query:
"select stat_id, stat_name from pheno_stations where stat_name like '%Geisenheim%';"
"select * from dwd_pheno_def where plant_name_en like '%chestnut%' and phase_name_en like '%flowering%';"
"select obs_day, obs_year, source_db from all_pheno_obs where stat_id=2430 and phase_id=8;"
"select avg(obs_day) mean, b.plant_name_en plant, b.phase_name_en phase from dwd_pheno_obs a, dwd_pheno_def b where a.phase_id=b.phase_id and a.phase_id in (1,8,220) group by a.phase_id order by mean"
"select c, count(c) from (select stat_id as sid , phase_id as pid , count(distinct obs_year) as c from all_pheno_obs where phase_id != 0 group by stat_id,phase_id) as sq group by c"