problem - group by

From: Dusan PESL <D(dot)PESL(at)seznam(dot)cz>
To: pgsql-novice(at)postgresql(dot)org
Subject: problem - group by
Date: 2007-05-13 14:37:26
Message-ID: 87.307-12617-1810157773-1179067046@seznam.cz
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-novice

Hello,

I have found the solution of "GROUP BY" problem. Instead of:

SELECT acount/1000, SUM(values) FROM acounts
GROUP BY acount/1000

this query works:

SELECT acount/1000 AS acount_1000, SUM(values) FROM acounts
GROUP BY acount_1000

so, forget my previous question...

Best regards Dusan

Browse pgsql-novice by date

  From Date Subject
Next Message Rodrigo De León 2007-05-13 21:05:26 Re: return modified data from a function
Previous Message Dusan PESL 2007-05-12 08:26:17 problem - group by