All Forums Database
Kuldeepg92 5 posts Joined 08/16
18 Aug 2016
Teradata Query-URGENT

There is table with coulmns:
INTL_EMP_ID
PRSCT_FILL_ID
ACTVTY_TS
EMPLYE_NBR
EMP_ID
 
Problem Statement: select INTL_EMP_ID from table for that PRSCT_FILL_ID.
order by ACTVTY_TS in ascending order and get the first EMPLYE_NBR and its corresponding EMP_ID.
 
Thank you.
 

dnoeth 4628 posts Joined 11/04
18 Aug 2016

Whenever I read URGENT I tend to fall into tranquilo, mañana mode :-)
 
QUALIFY ROW_NUMBER() OVER (PATTITION whatever ORDER BY whatever) = 1

Dieter

CarlosAL 512 posts Joined 04/08
18 Aug 2016

Hi Dieter.
I'm afraid the mode I fall into is much less polite than yours... ;-)
Cheers.
Carlos.

You must sign in to leave a comment.