Combining queries while preserving order in SQL - Help!

From: Casey Allen Shobe <cshobe(at)osss(dot)net>
To: pgsql-sql(at)postgresql(dot)org
Subject: Combining queries while preserving order in SQL - Help!
Date: 2002-12-02 18:46:38
Message-ID: 200212021346.38338.cshobe@osss.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

Hi there,

I need to do the following in one SQL query:

select field1, field2, field3, field4, field5 from table where field6 < 5
order by field1

And a totals line which shows the sum for each column.

The important part is that I need to preserve the order by of the first query.

Is there any way to do this in one query?

Thank you,

--
Casey Allen Shobe, Open Source Software Solutions
cshobe(at)osss(dot)net / http://www.osss.net / 770-653-4526

Responses

Browse pgsql-sql by date

  From Date Subject
Next Message Joel Burton 2002-12-02 18:46:56 Re: Min and Max
Previous Message Dennis Björklund 2002-12-02 18:44:03 Re: Min and Max