Re: Group by weekday
Posted in 1994
Jonathan Leffler (johnl@informix.com) wrote: (answering this question) : >Anyone have any crafty ways of GROUPing BY an arbitrary day of the week? : >For instance, all rows over the last year grouping the data by friday : >of each week? Jonathan said -> : SELECT WEEKDAY(SomeDate), SomeOtherColumn : FROM SomeTable : WHERE SomeColumn = 'SomeValue' : GROUP BY 1; Jonathan, Will this really work without including SomeOtherColumn in the group by clause? I thought that you had to include any other columns other than aggregates in the GROUP BY. -- =========================================================================== jlumbley@netcom.com (Joe Lumbley) BancTec 214-450-9896 Dallas, Texas Watch for my _INFORMIX DBA SURVIVAL GUIDE_ in Sept '94 from Prentice Hall! (Informix Press, ISBN 0-13-124314-4) ===========================================================================