|
Neohapsis is currently accepting applications for employment. For more information, please visit our website www.neohapsis.com or email hr@neohapsis.com |
From: Peter Brawley (peter.brawley
earthlink.net)
Date: Sat Oct 27 2007 - 14:07:03 CDT
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Neil,
Do you mean ...
SELECT DATE(datetimecol) AS date,colourcol,COUNT(*)
FROM tbl
GROUP BY date,colourcol;
PB
------
Neil Tompkins wrote:
> Hi,
>
> I have a table of records all of which have a timestamp against them like 2007-10-25 10:10:19, and category like red, blue etc and a unique key.
>
> Using a SELECT statement is it possible to retrieve the count and number of records for each day e.g 2007-10-25 for all red, and all blue etc
>
> Thanks.
> Neil
> _________________________________________________________________
> Feel like a local wherever you go.
> http://www.backofmyhand.com
>
> ------------------------------------------------------------------------
>
> No virus found in this incoming message.
> Checked by AVG Free Edition.
> Version: 7.5.503 / Virus Database: 269.15.11/1094 - Release Date: 10/26/2007 8:50 AM
>
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]