Could this be done better...? - Mailing list pgsql-sql

From The Hermit Hacker
Subject Could this be done better...?
Date
Msg-id Pine.BSF.4.21.0001080301130.18498-100000@thelab.hub.org
Whole thread Raw
List pgsql-sql
SELECT status,sum(case when next_index_time<=%d                   then 1 else 0 end),count(*)  FROM url WHERE 1=1
%s%s%sGROUP 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 



pgsql-sql by date:

Previous
From: Tom Lane
Date:
Subject: Re: [SQL] createdb -D xxxx not working
Next
From: "Richard Walker"
Date:
Subject: Re: [SQL] Serial field starting at 100 ?