Home Page for the TeradataForum
 

Archives of the TeradataForum

Message Posted: Tue, 15 Aug 2006 @ 23:13:12 GMT


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


Subj:   Re: Max And Count without Group by
 
From:   Castelli Emanuel Alejandro

I choose this option:

     select
     cd_producto,
     cd_equipo_adsl,
     count(cd_producto) over(partition by cd_producto)
     from
     productos
     qualify row_number() over(partition by cd_producto order by
     cd_equipo_adsl desc) = 1;

Thanks anyway.

Castelli, Emanuel Alejandro
Desarrollo DataWarehouse - IBM Argentina



     
  <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