Quantcast
Channel: Teradata Forums - Database
Viewing all articles
Browse latest Browse all 14773

Selecting a column based on DATE along with GROUP BY - response (1) by Raja_KT

$
0
0

Hi Sagar,
You mean to say you dont want this way below?

select abc.u_id as gid,dt.mid from
(SELECT MAX(date1) over (partition by gid order by gid) dt1,gid,mid,u_id FROM ABC) dt, abc
where abc.date1=dt.dt1 order by 2

or is okay?
Cheers,
Raja


Viewing all articles
Browse latest Browse all 14773

Trending Articles