Query Question

K

kathekas

I have a table called simpleweather with a date field, showing 20/10/2008
19:32:00 DD,MM,YteY hh,mm called datadate, outdoors (which is a temperature
measurement).

I want to select the max outdoors for each day

SELECT Left(simleweather.datadate,10) AS DataDate,
Max(simpleweather.outdoors) AS MaxOfoutdoors
FROM simpleweather
GROUP BY simpleweather.datadate;

Please can some assist?
 
J

John Spencer

SELECT DateValue(DataDate) as TheDate, Max(outdoors) as MaxTemp
FROM SimpleWeather
WHERE DataDate is not Null
GROUP BY DateValue(DataDate)

You could use your query with the following modification of the Group by
clause plus fixing the misspelled table name (simleweather)

SELECT Left(simpleweather.datadate,10) AS DataDate,
Max(simpleweather.outdoors) AS MaxOfoutdoors
FROM simpleweather
GROUP BY Left(simpleweather.datadate,10)

'====================================================
John Spencer
Access MVP 2002-2005, 2007
Center for Health Program Development and Management
University of Maryland Baltimore County
'====================================================
 
K

kathekas

Thank you gentlemen for your help.

Its working now.

What a quick response. Thank you
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top