Could this be done better...?

From: The Hermit Hacker <scrappy(at)hub(dot)org>
To: pgsql-sql(at)postgresql(dot)org
Subject: Could this be done better...?
Date: 2000-01-08 07:03:16
Message-ID: Pine.BSF.4.21.0001080301130.18498-100000@thelab.hub.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql


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(at)hub(dot)org secondary: scrappy(at){freebsd|postgresql}.org

Browse pgsql-sql by date

  From Date Subject
Next Message admin 2000-01-09 21:33:31 can't seem to use index
Previous Message Tom Lane 2000-01-08 06:47:58 Re: [SQL] createdb -D xxxx not working