|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
GROUP BY Month
Does anyone have an example of how to group by month? This query isn't playing ball:
SELECT EXTRACT(MONTH FROM m.Created), COUNT(*) as CountMessages FROM Messages m INNER JOIN Clients c ON m.ClientID=c.ClientID WHERE c.ClientID=5 GROUP BY EXTRACT(MONTH FROM m.Created) I'm running it on Interbase. thanks in advance. Adam |
|
#2
|
|||
|
|||
|
This would run on Firebird.
Firebird is not InterBase. You cannot do this on InterBase. On InterBase, the best thing you can do is create a view for the query, without the GROUP BY, the select from the view and group by the resulting column in the view. -- With regards, Martijn Tonies Database Workbench - tool for InterBase, Firebird, MySQL, Oracle & MS SQL Server Upscene Productions http://www.upscene.com Database development questions? Check the forum! http://www.databasedevelopmentforum.com
__________________
Martijn Tonies Database Workbench: developer IDE for Firebird, MySQL, InterBase, MSSQL Server and Oracle Upscene Productions http://www.upscene.com |
![]() |
| Viewing: Dev Shed Forums > Databases > Firebird SQL Development > GROUP BY Month |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|