I'm trying to query the table to extract the single highest value of a chemical by location and date. This statement gives me all the values per stream, site, and date:
SELECT str_name, site_id, sample_date, max(quant) FROM chemistry WHERE hydro = 'Humboldt' group by str_name, sample_date, site_id order by str_name, site_id;
I'm not seeing why this doesn't work; the top few lines of output are: