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
7671 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((-119.8828125 41.541477666790286,-120.1904296875 39.9434364619742,-119.70703125 38.341656192795924,-119.00390625 37.02009820136811,-117.9931640625 35.746512259918504,-117.4658203125 35.06597313798418,-115.751953125 34.70549341022544,-114.78515625 35.20972164522138,-114.1259765625 36.52729481454622,-113.203125 37.78808138412046,-112.412109375 39.16414104768742,-112.3681640625 41.046216814520626,-113.466796875 42.13082130188811,-117.24609375 42.29356419217007,-119.8828125 41.541477666790286))'),loc.mypoint) AND age.sample_num = samp.sample_num
AND
(age.calculated_age >= 0 AND age.calculated_age <= 25)
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
|