Home Page for the TeradataForum
 

Archives of the TeradataForum

Message Posted: Mon, 24 May 2005 @ 01:10:07 GMT


     
  <Prev Next>   <<First <Prev Next> Last>>  


Subj:   Re: Group by on one column but select multiple columns
 
From:   Michael Larkins

You might try a correlated subquery:

     select emp_name, emp_id, last_dt
       from  employee K1
     where last_dt = ( select max(last_dt)from employee K2
                          where K1.emp_id = K2.emp_id);

Hope this helps,

Michael Larkins
Certified Teradata Master
Certified Teradata SQL Instructor



     
  <Prev Next>   <<First <Prev Next> Last>>  
 
 
 
 
 
 
 
 
  
  Top Home Privacy Feedback  
 
 
Copyright for the TeradataForum (TDATA-L), Manta BlueSky    
Copyright 2016 - All Rights Reserved    
Last Modified: 15 Jun 2023