Ühel kenal päeval, L, 2006-07-29 kell 18:25, kirjutas Martijn van
> On Sat, Jul 29, 2006 at 03:37:15AM +0300, Tzahi Fadida wrote:
> > Hi,
> > I have a query i am having trouble to formulate:
> > I used to do:
> > SELECT DISTINCT a0,a1 FROM public.t1
> > However, now i need to add the CTID attribute, but CTID is unique
> > thus, distinct is useless. In addition, i can't seem to be able to use max()
> > etc... or casting to anything on CTID in order to use group by technique.
> Use DISTINCT ON, see the docs for details.
> That's for an older version, but it still works the same, google isn't
> delivering the newer version...
replace /7.4/ with /8.1/ to get a newer version ;)
> Have an nice day,
Skype Technologies OÜ
Akadeemia tee 21 F, Tallinn, 12618, Estonia
Skype me: callto:hkrosing
Get Skype for free: http://www.skype.com
In response to
pgsql-hackers by date
|Next:||From: Andrew Dunstan||Date: 2006-07-29 20:15:53|
|Subject: Re: [HACKERS] Possible explanation for Win32 stats regression|
|Previous:||From: Sergey E. Koposov||Date: 2006-07-29 19:36:39|
|Subject: Re: Do we need multiple forms of the SQL2003 statistics|