pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Stephan Bauer <stephan_bauer@gmx.de>
To: pgsql-sql@postgresql.org
Cc: Dietmar Kling <dietmar.kling@sam-net.de>
Subject: select with group by problem
Date: Fri, 17 Dec 1999 14:11:53 +0100
Message-ID: <385A3699.36A4E9FF@gmx.de> (raw)

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)



view thread (5+ messages)  latest in thread

Message-ID: <385A3699.36A4E9FF@gmx.de>
Permalink:  ../385A3699.36A4E9FF@gmx.de/
Also on:    postgresql.org/message-id/385A3699.36A4E9FF@gmx.de

 · 

reply

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: stephan_bauer@gmx.de, dietmar.kling@sam-net.de
  Subject: Re: select with group by problem
  In-Reply-To: <385A3699.36A4E9FF@gmx.de>
  References: <385A3699.36A4E9FF@gmx.de>

* 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