Home Page for the TeradataForum
 

Archives of the TeradataForum

Message Posted: Tue, 15 Aug 2006 @ 16:15:08 GMT


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


Subj:   Re: Max And Count without Group by
 
From:   Anomy Anom

<-- Anonymously Posted: Tuesday, August 15, 2006 12:16 -->

How about

     select Col1 as product
          , max(col2) as max_date
          , count(col2) as total
     from tab01
     group by 1;


     
  <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