Login ProductsSalesSupportDownloadsAbout |
Home » Technical Support » ElevateDB Technical Support » Support Forums » ElevateDB SQL » View Thread |
Messages 1 to 6 of 6 total |
Group By month or date range |
Wed, Oct 12 2011 4:33 AM | Permanent Link |
IQA | Hi,
I'm looking for the most efficient way to group by a month or a week or a year. Maybe if I can work out the best way to say group by a month I can work out the others. The field I will be grouping by is a timestamp. Any ideas? Thanks, Phil. |
Wed, Oct 12 2011 5:15 AM | Permanent Link |
Roy Lambert NLH Associates Team Elevate | Philip
select _HideAlarm, EXTRACT(MONTH FROM _HideAlarm) from calls group by EXTRACT(MONTH FROM _HideAlarm) Roy Lambert [Team Elevate] |
Wed, Oct 12 2011 5:30 AM | Permanent Link |
IQA | Roy, you da man!
Thanks muchly! Phil. |
Wed, Oct 12 2011 5:38 AM | Permanent Link |
Ian Branch | Roy Lambert wrote:
> select _HideAlarm, EXTRACT(MONTH FROM _HideAlarm) from calls > group by EXTRACT(MONTH FROM _HideAlarm) For readability, could you not do.. select _HideAlarm, EXTRACT(MONTH FROM _HideAlarm) as _Month from calls group by _Month Ian |
Wed, Oct 12 2011 6:05 AM | Permanent Link |
Roy Lambert NLH Associates Team Elevate | Ian
Having just tried it - yes Roy Lambert |
Wed, Oct 12 2011 7:24 AM | Permanent Link |
IQA | Brilliant, thanks Roy and Ian !
|
This web page was last updated on Tuesday, April 30, 2024 at 03:55 PM | Privacy PolicySite Map © 2024 Elevate Software, Inc. All Rights Reserved Questions or comments ? E-mail us at info@elevatesoft.com |