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
12 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.938232421875 37.8791893148165,-118.02886962890625 37.85100126460795,-118.10028076171875 37.88786039168385,-118.15521240234375 37.88352498087131,-118.1964111328125 37.792422407988575,-118.16619873046875 37.71424496764924,-118.092041015625 37.640334898059486,-117.9986572265625 37.568528265476075,-117.916259765625 37.642509774448754,-117.78717041015625 37.67947293019486,-117.74871826171875 37.792422407988575,-117.8118896484375 37.86401247373357,-117.938232421875 37.8791893148165))'),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
|