From: | Stephan Bauer <stephan_bauer(at)gmx(dot)de> |
---|---|
To: | pgsql-sql(at)postgresql(dot)org |
Cc: | Dietmar Kling <dietmar(dot)kling(at)sam-net(dot)de> |
Subject: | select with group by problem |
Date: | 1999-12-17 13:11:53 |
Message-ID: | 385A3699.36A4E9FF@gmx.de |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-sql |
Hello,
could anyone tell me why the second select statement returns one row.
regards
Stephan
xtra=> select * from
warenkorb;
cookie|datum|artnr|artnr1|artnr2|artikelname|farbe|groesse|menge|preis
------+-----+-----+------+------+-----------+-----+-------+-----+-----
(0 rows)
xtra=> SELECT artnr, artnr1, artnr2, artikelname, farbe, groesse, SUM(
menge ),
preis FROM warenkorb WHERE cookie = 'asdfasdf' GROUP BY artnr, artnr1,
artnr2,
artikelname, farbe, groesse, preis;
artnr|artnr1|artnr2|artikelname|farbe|groesse|sum|preis
-----+------+------+-----------+-----+-------+---+-----
| | | | | | |
(1 row)
From | Date | Subject | |
---|---|---|---|
Next Message | kaiq | 1999-12-17 15:26:13 | Re: [SQL] select with group by problem |
Previous Message | Margarit Nickolov | 1999-12-17 09:43:41 | Re: [SQL] adding time to a datetime field ... how? |