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
34 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.82012939453125 36.446694448546836,-117.75970458984375 36.50301312197295,-117.70751953125 36.54053616262899,-117.6416015625 36.542742833547834,-117.57568359375 36.531708849148664,-117.5262451171875 36.507428541837264,-117.498779296875 36.45442688547799,-117.47406005859375 36.416862115300304,-117.4658203125 36.37043347989968,-117.47543334960938 36.33504067209607,-117.50839233398438 36.31401858021655,-117.56881713867188 36.311805398567465,-117.64846801757812 36.32065774818662,-117.7349853515625 36.34167804918313,-117.78854370117188 36.357163062654365,-117.81463623046875 36.40802070382981,-117.82012939453125 36.446694448546836))'),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
|