The Little Guy Posted May 5, 2010 Share Posted May 5, 2010 I have a time stamp column in my table, and I would like to get all the values and group them by hour I did this once, but I don't remember how I did it, anyone know how I can do this? Link to comment https://forums.phpfreaks.com/topic/200753-group-by-hour/ Share on other sites More sharing options...
jskywalker Posted May 5, 2010 Share Posted May 5, 2010 if you are grouping on hour, what do you want to do with the columns you are not grouping on? if you have 1 10:02 34 2 11:34 12 3 11:36 14 5 12:02 54 what do you expect to be the result after grouping on hour? Link to comment https://forums.phpfreaks.com/topic/200753-group-by-hour/#findComment-1053488 Share on other sites More sharing options...
Mchl Posted May 5, 2010 Share Posted May 5, 2010 GROUP BY HOUR(timestampColumn) ?? Link to comment https://forums.phpfreaks.com/topic/200753-group-by-hour/#findComment-1053568 Share on other sites More sharing options...
fenway Posted May 5, 2010 Share Posted May 5, 2010 See here. Link to comment https://forums.phpfreaks.com/topic/200753-group-by-hour/#findComment-1053617 Share on other sites More sharing options...
The Little Guy Posted May 5, 2010 Author Share Posted May 5, 2010 GROUP BY HOUR(timestampColumn) ?? Thanks! That worked! Link to comment https://forums.phpfreaks.com/topic/200753-group-by-hour/#findComment-1053694 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.