Forum Discussion

jensjakobsen1966's avatar
jensjakobsen1966
Brass Contributor
Nov 22, 2020
Solved

Count number of records per date

Hi I have a query in my MS Access DB, approximately 15.000 rows, with a date (date and time per field) for each record. I want to create a query, where I can show how many entries there are for...
  • George_Hepworth's avatar
    George_Hepworth
    Nov 23, 2020

    jensjakobsen1966

    My error in throwing that out there untested. The Group By needs to match the field selected as does the Order By. That is to say DateValue(Received) 
    Try this:
    SELECT DateValue(Received) AS DateWithOutTime, Count(*) AS ItemsPerDay
    FROM Mails
    GROUP BY DateValue(Received)
    ORDER BY DateValue(Received) ;

     

Resources