how to get????

Results 1 to 2 of 2

Thread: how to get????

  1. #1
    Join Date
    Dec 1969

    Default how to get????

    i have a table that saves messages including when it was sent (date_sent). Now i wish to retrieve the date with most messages saved...what sql query should i use?<BR><BR>I currently use:<BR>highSQL = "SELECT MAX(date_sent) as highest FROM table1"<BR><BR>But i see that the result is retrieves the latest date, not the result i wish to have

  2. #2
    Join Date
    Dec 1969

    Default RE: how to get????

    SELECT TOP 1 date_sent, COUNT(date_sent) as NumberSent<BR>FROM TheTable<BR>GROUP BY date_sent<BR>ORDER BY COUNT(date_sent) DESC<BR><BR>

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts