I need to write a sql statment to get a WPM count for each day in my table. It will have
multiple entries for some days; I just need the highest WPM. Also, excluding null entries.
The data set should look like:
Date_completed, Max_WPM
date here, wpm
date here, wpm
SELECT
DISTINCT A.DATE_COMPLETED
,A.WPM Max_WPM
FROM KEYBOARD_LEARNING A
I am trying to filter where only distinct days return in the result set for this table. But the above query isn’t working. How can I return just distinct dates with the WPM?
DATE_completed MAX_WPM
-------------------------- ---------------
7/12/2012 ...
7/12/2012 ....
7/12/2012
7/22/2012
7/6/2012
7/12/2012
7/12/2012
7/6/2012
7/12/2012
7/12/2012
7/6/2012
7/6/2012
6/13/2012
7/12/2012
7/12/2012
7/16/2012
6/6/2012
7/6/2012
7/6/2012
6/12/2012
6/13/2012
7/6/2012
7/6/2012
7/6/2012
7/12/2012
6/13/2012
7/4/2012
6/14/2012
7/6/2012
It sounds like you want
This assumes that none of the
DATE_COMPLETEDvalues has a time component. If it does, you’d need toTRUNCthe date