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
26 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((-117.5592041015625 36.45000844447082,-117.50152587890625 36.28634929429456,-117.410888671875 36.15783544102625,-117.35595703125 35.98689628443789,-117.35595703125 35.88905007936091,-117.26531982421875 35.84008157153468,-117.14996337890625 35.73982452242507,-117.12799072265625 35.59478566548724,-116.99066162109375 35.617116483821846,-117.13348388671875 35.88459964717596,-117.18292236328125 36.04243673532787,-117.2296142578125 36.23762751669998,-117.3614501953125 36.43012234551576,-117.4603271484375 36.48755716938579
,-117.5592041015625 36.45000844447082))'),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
|