From: The Hermit Hacker <scrappy@hub.org>
To: pgsql-sql@postgresql.org
Subject: Could this be done better...?
Date: Sat, 8 Jan 2000 03:03:16 -0400 (AST)
Message-ID: <Pine.BSF.4.21.0001080301130.18498-100000@thelab.hub.org> (raw)
SELECT status,sum(case when next_index_time<=%d
then 1 else 0 end),count(*)
FROM url WHERE 1=1 %s%s%s GROUP BY status;
There may not be enough info here to answer, but the 'case/then/else/end'
just looks weird to me...
Marc G. Fournier ICQ#7615664 IRC Nick: Scrappy
Systems Administrator @ hub.org
primary: scrappy@hub.org secondary: scrappy@{freebsd|postgresql}.org
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: scrappy@hub.org
Subject: Re: Could this be done better...?
In-Reply-To: <Pine.BSF.4.21.0001080301130.18498-100000@thelab.hub.org>
References: <Pine.BSF.4.21.0001080301130.18498-100000@thelab.hub.org>
* 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