Home Page for the TeradataForum
 

Archives of the TeradataForum

Message Posted: Tue, 02 Oct 2007 @ 20:08:25 GMT


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


Subj:   Re: Float data type compressions
 
From:   Babak Teymouri

Find out the most 255 used values and compress them.

This query may help you to find out which values are in the most 255 list.

( I'm using this on a V2R6.2 system )

     Select columnname
     , count(*) as nbvals
     , sum( nbvals) over(order by nbvals desc rows between unbounded
     preceding and current row) /
              ( Sum(nbvals) over() (float) )  as cumulative_distribution
     >From tablename
     Group by columnname
     Qualify rank() over( order by nbvals desc )  <= 255

Cheers,

Babak



     
  <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