-
Notifications
You must be signed in to change notification settings - Fork 0
/
qf_2.yaml
47 lines (47 loc) · 6.65 KB
/
qf_2.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
stand:
query_sm: "SELECT fsdbdata.dbo.tp00101.treeid, fsdbdata.dbo.tp00101.species, \
fsdbdata.dbo.tp00101.standid, fsdbdata.dbo.tp00101.plotid, \
fsdbdata.dbo.tp00103.dbh_last, \
fsdbdata.dbo.tp00103.year FROM fsdbdata.dbo.tp00101 \
LEFT JOIN fsdbdata.dbo.tp00103 \
ON fsdbdata.dbo.tp00101.treeid = fsdbdata.dbo.tp00103.treeid \
WHERE fsdbdata.dbo.tp00101.standid like '%s' \
AND fsdbdata.dbo.tp00101.species like '%s' \
ORDER BY fsdbdata.dbo.tp00103.treeid ASC"
query_context_dtl: "SELECT PLOTID from fsdbdata.dbo.tp00112 where detailplot like 'Y'"
query_context_dtl1: "SELECT PLOTID, year, detailplot, PLOT_AREA_M2_CORR, DBH_MINIMUM from fsdbdata.dbo.tp00112 where plotid like '{standid}%'"
query_additions: "select distinct plotid, year from fsdbdata.dbo.tp00112 where activity like 'A'"
query_mortalities: "select distinct plotid, year from fsdbdata.dbo.tp00112 where activity like 'M'"
query_replacements: "select distinct(year) from fsdbdata.dbo.tp00112 where plotid like '{standid}%' and activity in ('R','E')"
query_all_year: "select distinct(year) from fsdbdata.dbo.tp00102 where treeid like '{standid}%'"
query: "SELECT fsdbdata.dbo.tp00101.treeid, fsdbdata.dbo.tp00101.species, fsdbdata.dbo.tp00101.standid, fsdbdata.dbo.tp00101.plotid, fsdbdata.dbo.tp00102.dbh, fsdbdata.dbo.tp00102.tree_status, fsdbdata.dbo.tp00102.year, fsdbdata.dbo.tp00102.dbh_code, fsdbdata.dbo.tp00101.PSP_STUDYID FROM fsdbdata.dbo.tp00101 LEFT JOIN fsdbdata.dbo.tp00102 ON fsdbdata.dbo.tp00101.treeid = fsdbdata.dbo.tp00102.treeid WHERE fsdbdata.dbo.tp00101.standid like '{standid}' ORDER BY fsdbdata.dbo.tp00102.year ASC, fsdbdata.dbo.tp00101.species, fsdbdata.dbo.tp00101.plotid"
query_trees_m: "SELECT fsdbdata.dbo.tp00101.treeid, fsdbdata.dbo.tp00101.species, fsdbdata.dbo.tp00101.standid, fsdbdata.dbo.tp00101.plotid, fsdbdata.dbo.tp00103.dbh_last, fsdbdata.dbo.tp00103.year FROM fsdbdata.dbo.tp00101 LEFT JOIN fsdbdata.dbo.tp00103 ON fsdbdata.dbo.tp00101.treeid = fsdbdata.dbo.tp00103.treeid WHERE fsdbdata.dbo.tp00101.standid like '{standid}' ORDER BY fsdbdata.dbo.tp00103.year ASC"
query_species: "SELECT DISTINCT(fsdbdata.dbo.tp00101.species) from fsdbdata.dbo.tp00101 WHERE fsdbdata.dbo.tp00101.standid like '{standid}'"
query_unusual_plot_sql: "SELECT plotid, year, PLOT_AREA_M2_CORR from fsdbdata.dbo.tp00112 where PLOT_AREA_M2_CORR not like '625'"
query_total_stand_sql: "select distinct year, plotid, PLOT_AREA_M2_CORR from fsdbdata.dbo.tp00112 where activity in ('R','E') group by year, plotid, PLOT_AREA_M2_CORR"
query_unusual_plot_minimums_sql: "select plotid, year, DBH_MINIMUM from fsdbdata.dbo.tp00112 where detailPlot not like 'Y' and DBH_MINIMUM < 15.0"
plot:
query_species: "SELECT DISTINCT(fsdbdata.dbo.tp00101.species) from fsdbdata.dbo.tp00101 WHERE fsdbdata.dbo.tp00101.standid like '{standid}' and fsdbdata.dbo.tp00101.plotid like '{plotid}'"
query_spec: "SELECT fsdbdata.dbo.tp00101.treeid, fsdbdata.dbo.tp00101. species, fsdbdata.dbo.tp00101.standid, fsdbdata.dbo.tp00101.plotid, fsdbdata.dbo.tp00103.dbh_last, fsdbdata.dbo.tp00103.year FROM fsdbdata.dbo.tp00101 LEFT JOIN fsdbdata.dbo.tp00103 ON fsdbdata.dbo.tp00101.treeid = fsdbdata.dbo.tp00103.treeid WHERE fsdbdata.dbo.tp00101.plotid like '{plotid}' AND fsdbdata.dbo.tp00101.species like '{species}'"
query: "SELECT fsdbdata.dbo.tp00101.treeid, fsdbdata.dbo.tp00101.species, fsdbdata.dbo.tp00101.standid, fsdbdata.dbo.tp00101.plotid, fsdbdata.dbo.tp00102.dbh, fsdbdata.dbo.tp00102.tree_status, fsdbdata.dbo.tp00102.year, fsdbdata.dbo.tp00102.dbh_code, fsdbdata.dbo.tp00101.PSP_STUDYID FROM fsdbdata.dbo.tp00101 LEFT JOIN fsdbdata.dbo.tp00102 ON fsdbdata.dbo.tp00101.treeid = fsdbdata.dbo.tp00102.treeid WHERE fsdbdata.dbo.tp00101.standid like '{standid}' and fsdbdata.dbo.tp00101.plotid like '{plotid}' ORDER BY fsdbdata.dbo.tp00102.treeid ASC"
query_trees_m: "SELECT fsdbdata.dbo.tp00101.treeid, fsdbdata.dbo.tp00101.species, fsdbdata.dbo.tp00101.standid, fsdbdata.dbo.tp00101.plotid, fsdbdata.dbo.tp00103.dbh_last, fsdbdata.dbo.tp00103.year FROM fsdbdata.dbo.tp00101 LEFT JOIN fsdbdata.dbo.tp00103 ON fsdbdata.dbo.tp00101.treeid = fsdbdata.dbo.tp00103.treeid WHERE fsdbdata.dbo.tp00101.standid like '{standid}' and fsdbdata.dbo.tp0010.plotid like '{plotid}' ORDER BY fsdbdata.dbo.tp00103.treeid ASC"
query_plot: "SELECT year, plotid from fsdbdata.dbo.tp00112 where plotid like '{standid}%'"
query_plot_area_sql: "select plotid, year, plot_area_m2_corr from fsdbdata.dbo.tp00112 where plotid like '{standid}%'"
tree:
sql_1tree: "SELECT fsdbdata.dbo.tp00101.treeid, fsdbdata.dbo.tp00101.species, fsdbdata.dbo.tp00101.standid, fsdbdata.dbo.tp00101.plotid, fsdbdata.dbo.tp00102.dbh, fsdbdata.dbo.tp00102.tree_status, fsdbdata.dbo.tp00102.year, fsdbdata.dbo.tp00102.dbh_code, fsdbdata.dbo.tp00101.PSP_STUDYID, fsdbdata.dbo.tp00101.STANDID FROM fsdbdata.dbo.tp00101 LEFT JOIN fsdbdata.dbo.tp00102 ON fsdbdata.dbo.tp00101.treeid = fsdbdata.dbo.tp00102.treeid WHERE fsdbdata.dbo.tp00101.treeid like '{tid}' ORDER BY fsdbdata.dbo.tp00102.year ASC"
sql_1tree_eqn: "SELECT SPECIES, EQNSET, FORM, H1, H2, H3, B1, B2, B3, J1, J2, WOODDENSITY, PROXY, COMPONENT from fsdbdata.dbo.tp00110 where SPECIES like '{species}'"
sql_1tree_eqn_j2: "SELECT SPECIES, EQNSET, FORM, H1, H2, H3, B1, B2, B3, J1, J2, J3, J4, WOODDENSITY, PROXY, COMPONENT from fsdbdata.dbo.tp00110 where SPECIES like '{species}'"
lite_1tree_dtl: "SELECT detailPlot from plotAreas where standID like '{standid}' and plot like '{plot}' and year like '{year}' and minDBH_cm_dbh <= '{dbh}'"
lite_1tree_context_dtl: "SELECT Area_m2_corr, detailPlot from plotAreas where standID like '{standid}' and year like '{year}'"
cli_stand_tree: "SELECT distinct(treeid) from fsdbdata.dbo.tp00101 where standID like '{standid}'"
tag_and_notes: "SELECT year, tag, check_notes from fsdbdata.dbo.tp00102 where treeid like '{treeid}'"
testing:
test_tree: "select distinct(treeid) from fsdbdata.dbo.tp00101 where treeid like 'NCNA%'"
execution:
all_tree: "select distinct(treeid) from fsdbdata.dbo.tp00101"
all_tree_one_stand: "select distinct(treeid) from fsdbdata.dbo.tp00101 where standid like '{STANDID}'"
list_of_trees: "select treeid from fsdbdata.dbo.tp00101 where treeid in ({list_of_ids})"
list_of_stands: "select distinct(standid) from fsdbdata.dbo.tp00101 where PSP_STUDYID like '{studyid}'"
list_of_all_stands: "select distinct(standid) from fsdbdata.dbo.tp00101"
list_of_all_studies: "select distinct(psp_studyid) from fsdbdata.dbo.tp00101"
list_of_stands_in_studies: "select distinct(standid) from fsdbdata.dbo.tp00101 where psp_studyid like '{studyid}'"