Being logged in allows you to access advanced search features such as saved queries and saved diagrams. Membership is free.
Please login or get a new account
|
|
Output Data
1486 samples found
Create an HTML Table, Excel File, or Tab-delimited Text File for viewing data
|
select sum(major_data_count) as smdc,
sum(samp_trace_data_count) as stdc,
sum(samp_isotope_data_count) as sidc,
sum(samp_majtrace_data_count) as ssmtd,
sum(samp_majtriso_data_count) as ssmdc,
sum(samp_total_data_count) as total
FROM
(SELECT
(case when samp.major_data = 'y' then 1 else 0 end) as major_data_count,
(case when samp.trace_data = 'y' then 1 else 0 end) as samp_trace_data_count,
(case when samp.isotope_data = 'y' then 1 else 0 end) as samp_isotope_data_count,
(CASE when samp.major_data='y' and samp.trace_data='y' then 1 else 0 end) as samp_majtrace_data_count,
(CASE when samp.major_data='y' and samp.trace_data='y' and samp.isotope_data='y' then 1 else 0 end) as samp_majtriso_data_count,
(CASE WHEN samp.sample_num > 0 then 1 else 0 end) as samp_total_data_count FROM view_data_output norm, sample samp, location loc, sample_age age, batch bat, reference ref, method meth WHERE ST_Contains(st_GeomFromText('Polygon((-109.951171875 34.38877925439018,-110.093994140625 34.261756524459805,-109.9951171875 33.80653802509606,-109.775390625 33.45894275368764,-109.1162109375 33.17434155100208,-108.621826171875 32.962586441917466,-108.45703125 32.85190345738802,-108.30322265625 32.7503226078097,-108.182373046875 32.667124733120325,-107.940673828125 32.63937487360669,-107.6220703125 31.99875937194732,-106.688232421875 31.970803930433096,-106.512451171875 32.93492866908233,-106.820068359375 33.77914733128647,-106.7431640625 33.60546961227188,-106.864013671875 34.831841149828655,-107.457275390625 35.0120020431607,-108.10546875 35.08395557927643,-108.80859375 35.110921809704756,-109.48974609375 34.95799531086792,-109.84130859375 34.72355492704219,-109.84130859375 34.72355492704219,-109.951171875 34.38877925439018))'),loc.mypoint) AND norm.sample_num = samp.sample_num AND age.sample_num = samp.sample_num AND loc.location_num = samp.location_num AND bat.sample_num = samp.sample_num AND ref.ref_num = bat.ref_num AND meth.method_num = age.method_num ) b
|