|
masterdineen
Aged Yak Warrior
United Kingdom
518 Posts |
Posted - 02/06/2013 : 11:52:30
|
hello there,
I am trying to select on some ticketing data, but the data column is datetime.
i want to do a select that groups by the date only.
at the moment my query looks like.
select transactionpurchasedate as 'Date', COUNT(transactionid) as 'Count' from Ticket_Facts group by transactionpurchasedate order by transactionpurchasedate asc
how can i group just on date and not datetime. |
|
|
masterdineen
Aged Yak Warrior
United Kingdom
518 Posts |
Posted - 02/06/2013 : 11:53:59
|
its ok ive done it
brain wave
select convert(date,transactionpurchasedate) as 'Date', COUNT(transactionid) as 'Count' from Ticket_Facts group by convert(date,transactionpurchasedate) order by convert(date,transactionpurchasedate) asc |
 |
|