Quantcast
Channel: Teradata Forums - All forums
Viewing all articles
Browse latest Browse all 27759

Showcase query: most recent check dates - response (1) by mandeep_m91

$
0
0

create multiset volatile table vt_max_date as
(
select vendorID,max(CheckDate) as maxDate
from vendor_info_table
group by vendorID
)
with data
on commit preserve rows;
 
select a.vendorID,a.checkNum
from vendor_info_table a, vt_max_date b
where a.vendorID = b.vendorID
and a.checkDate =b.maxDate;
 
 
Hope this helps..
 
Mandeep


Viewing all articles
Browse latest Browse all 27759

Trending Articles