Re: Can this be done in one query?

From: "Bjoern Metzdorf" <bm(at)turtle-entertainment(dot)de>
To: <pgsql-general(at)postgresql(dot)org>
Subject: Re: Can this be done in one query?
Date: 2002-05-07 22:40:11
Message-ID: 001301c1f618$2a01e5e0$0564a8c0@toolteam.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

> So, is there a way to do this in one query without creating a temp table?

How about a view:

create view test as select max(date) from log order by date_time desc limit
12;

select max(date) from test;

Greetings,
Bjoern

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Samuel J. Sutjiono 2002-05-07 22:40:32 Performance issues with compaq server
Previous Message Darren Ferguson 2002-05-07 22:21:08 Re: NOT IN query issues