On Friday, February 25, 2005 15:05, Asad Habib wrote:
> I am trying to use GROUP BY with a field of type text that is set to
> NOT NULL by default. However, in practice this field does not always
> contain a string for every record and defaults to the empty string in
> this case. When I try to us
That can't be the output of the query.
The fourth column would me titled 'soma'
There is no seperator bar between the data for sw_or_local and soma on
the data lines.
Fabio Bernardo wrote:
hi there
I wrote this querie :
select pop, prot, sw_or_local, sum(qtd_porta) as soma from clientes where
s
Fabio Bernardo wrote:
select pop, prot, sw_or_local, sum(qtd_porta) as soma from clientes where
status<>'C' group by pop,prot,sw_or_local
And I have this result :
+++-++
| pop| prot | sw_or_local | sum |
+++-++
|B
Serge,
> Is it possible in mySQL to GROUP BY months on a date field?
> For example:
> SELECT invDate,prdCategory,sum(prdPrice)
> GROUP BY left(invDate,6),prdCategory
> If invDate is in the format 20020202
> then group by the first 6 characters
> would return the total of sales
> by product catego
Is it possible in mySQL to GROUP BY months on a date field?
For example:
SELECT invDate,prdCategory,sum(prdPrice)
GROUP BY left(invDate,6),prdCategory
If invDate is in the format 20020202
then group by the first 6 characters
would return the total of sales
by product category and by month.
I
It was my understanding that it should actually work that way, but SQL does not
guarantee that with GROUP BY clauses -- you would want to use an ORDER BY clause if
you want to guarantee order. The problem could be in one of your char fields --
maybe an extra space somewhere that's messing up
You might want to add an ORDER BY clause.
Sommai Fongnamthip wrote:
> Hi,
> did someone tell me why group by clause not work? I'd like to group
> volume of order from my customer at the same price and my supplier.
> here is my code
>
> Select custid, symbol, sum(volume) as sumvol,