Query Praise!

From: Matthew Hagerty <matthew(at)brwholesale(dot)com>
To: pgsql-sql(at)postgresql(dot)org
Subject: Query Praise!
Date: 2002-04-19 19:24:48
Message-ID: 5.1.0.14.2.20020419152136.00b50938@imap.brwholesale.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

Haha, Tom Lane (and all the pg developers), you ROCK! Thanks a million!!!

These kinds of queries save my ass!

select sum(score) from (select distinct on (question_id) score from answers
where score is not null order by question_id,score) as score;

Matthew

Browse pgsql-sql by date

  From Date Subject
Next Message Brian Kosick 2002-04-19 20:07:33 Trying to get query to work
Previous Message Jie Liang 2002-04-19 18:32:06 Re: How to log outputs from pl/pgsql into a file ?