![]() |
SQL to group data by Day
Hi
I'm new to unix time format, could someone point me in the right direction so I can produce a query which groups data based on a timestamp field by calendar day? Thanks in advance. Simon |
Quote:
|
Perfect!
Thank you very much indeed, that's got me started. Simon |
Won't that group Jan 1 with March 1 and May 1 etc...?
|
Quote:
|
Quote:
|
sorry guys, I missed this..
Yeah, I had a quick play, realised that, as you say it grouped by day of the month, so just added year and month fields, and sorted by them as well. Thank to both :) - For anyone reading this and still struggling, use : year(from_unixtime(timestamp_field)) as year, month(from_unixtime(timestamp_field)) as month, day(from_unixtime(timestamp_field)) as day... then group by year, month, day order by year, month, day |
All times are GMT. The time now is 11:47 AM. |
Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|