pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Josh Berkus <josh@agliodbs.com>
To: Sara Cohen <sarina@cs.huji.ac.il>
Cc: pgsql-sql@postgresql.org
Subject: Re: Subqueries in select clause
Date: Wed, 18 Apr 2001 08:44:07 -0700
Message-ID: <web-41185@davinci.ethosmedia.com> (raw)
In-Reply-To: <Pine.LNX.4.20_heb2.08.0104181244450.32127-100000@inferno-01.cs.huji.ac.il>

Sara,

Hey!   Great to see that Postgres has made it to Israel.  What's the
most popular Linux distribution there?

I think you have your answer ... an upgrade.  RPMs for most major
distributions of Linux should be available within the week.

Until you can upgrade, though, try this approach:

CREATE VIEW c_aggregate AS
SELECT sum(a) as sum_a, b FROM c GROUP BY b;

SELECT max(sum_a) FROM c_aggregate;

Not as fast or dynamic as a subselect, but should solve your immediate
problem.

-Josh Berkus


______AGLIO DATABASE SOLUTIONS___________________________
                                       Josh Berkus
  Complete information technology      josh@agliodbs.com
   and data management solutions       (415) 565-7293
  for law firms, small businesses        fax 621-2533
    and non-profit organizations.      San Francisco



view thread (6+ messages)  latest in thread

Message-ID: <web-41185@davinci.ethosmedia.com>
Permalink:  ../web-41185@davinci.ethosmedia.com/
Also on:    postgresql.org/message-id/web-41185@davinci.ethosmedia.com

 · 

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: josh@agliodbs.com, sarina@cs.huji.ac.il
  Subject: Re: Subqueries in select clause
  In-Reply-To: <web-41185@davinci.ethosmedia.com>
  References: <Pine.LNX.4.20_heb2.08.0104181244450.32127-100000@inferno-01.cs.huji.ac.il> <web-41185@davinci.ethosmedia.com>

* 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