Whenever you use the Max() function on a column while accessing other
columns at the same time you need a GROUP BY statement so that the MAX()
function knows how to "group" it's results.
I suggest you look into the manual for this. In fact it has a tutorial
showing you options on how to do exactly
The trouble with this is it returns 1. It seems to pick the max value for the year
instead of by day.
--ja
On Mon, 20 Oct 2003, Franz, Fa. PostDirekt MA wrote:
> Hi,
>
> maybe I didn't understand the question wrong.
>
> >I have tried to work in the MAX(aqiNumber) into the query but I get a
I sent this out on last friday but I never actually saw it post to the list so maybe I
messed up the address. If this is showing up a second time, sorry.
I have a database where I want to count the number of days where a field gets to a
certain value. I am using two seperate queries to count t
I have a database where I want to count the number of days where a field gets to a
certain value. Right now I am using:
SELECT count(DISTINCT aqiValues.readingDate) as greenCount
FROMaqiRegions, aqiSites, aqiValues
WHERE aqiRegions.aqiRegionID = aqiSites.aqiRegionID AND