group by month(date)
Posted in 1999
Topics: SQL Development & Query Writing
bvolkan — — source: Informix-list mailing list archive (1991-1998)
Hi, How can I group fields in select query which are like month or day function. Thanks in advance Boris
↪ replying to bvolkan
Jonathan Leffler — — source: Informix-list mailing list archive (1991-1998)
bvolkan wrote: > How can I group fields in select query which are like > month or day function. One of: SELECT MONTH(datecol) as month_val, ... FROM Whereever WHERE ... GROUP BY month_val; Or: SELECT MONTH(datecol) as month_val, ... FROM Whereever WHERE ... GROUP BY 1; -- Jonathan Leffler (jleffler@informix.com, jleffler@earthlink.net) Guardian of DBD::Informix v0.60 -- see http://www.perl.com/CPAN #include <disclaimer.h>