List:General Discussion« Previous MessageNext Message »
From:Levy Carneiro Jr. Date:August 28 2000 8:43pm
Subject:Re: help with group by
View as plain text  
Hi Paul,

I meant grouping by each month.

>>I'd have to use something like a substring function, but "group by" 
>>doesn't accept that. Does anyone know how to solve this specific query ? 
>>Is this possible ?
>Yes; try using column aliases and naming those in the GROUP BY clasue.
>Here's an example:
>SELECT SUM(value), YEAR(date) AS year, MONTH(date) AS month
>FROM table
>GROUP BY year, month
>Is that what you want?

bingo !

Thank you for the help.

- lacj
PHP/Perl/MySQL Development

help with group byLevy Carneiro Jr.29 Aug
  • Re: help with group byPaul DuBois29 Aug
    • Re: help with group byLevy Carneiro Jr.29 Aug