VAdim,

Great work.

Keith.

disks=> select * from tracks t1 where t1.artist = (
disks->     select distinct  t2.artist from tracks t2 where t2.trackno = (
disks->         select max(t3.trackno) from tracks t3
disks->     )
disks->  );
diskid|trackno|artist       |song
------+-------+-------------+-----------------------------------
    51|      1|Elvis Presley|Hound Dog    
    .
    .
    .
    .
    .

   248|     25|Elvis Presley|The Wonder Of You
   248|     26|Elvis Presley|Bridge Over Troubled Water
(73 rows)

disks=>



Vadim B. Mikheev <vadim@sable.krasnoyarsk.su>
> 
> Sorry, I decided to copy subselect' tuple unconditionally...
> 
> Vadim


Thu, 19 Feb 1998 20:33:42 +0000 (GMT)
Keith Parks <emkxp01@mtcc.demon.co.uk>
Re: [HACKERS] Unexpected subselect result.