From: Vladimir Terziev <vlady@school.digsys.bg>
To: Stephan Bauer <stephan_bauer@gmx.de>
Cc: pgsql-sql@postgresql.org, Dietmar Kling <dietmar.kling@sam-net.de>
Subject: Re: [SQL] select with group by problem
Date: Mon, 20 Dec 1999 11:58:10 +0200 (EET)
Message-ID: <Pine.BSI.4.20.9912201157240.1054-100000@school.digsys.bg> (raw)
In-Reply-To: <385A3699.36A4E9FF@gmx.de>
The problem is in function SUM. That function always returns not null
result as rows.
Regards!
Vladimir
On Fri, 17 Dec 1999, Stephan Bauer wrote:
> 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)
>
> ************
>
>
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-sql@postgresql.org
Cc: vlady@school.digsys.bg, stephan_bauer@gmx.de, dietmar.kling@sam-net.de
Subject: Re: [SQL] select with group by problem
In-Reply-To: <Pine.BSI.4.20.9912201157240.1054-100000@school.digsys.bg>
References: <385A3699.36A4E9FF@gmx.de> <Pine.BSI.4.20.9912201157240.1054-100000@school.digsys.bg>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox