Home Page for the TeradataForum
 

Archives of the TeradataForum

Message Posted: Wed, 07 Nov 2007 @ 19:45:11 GMT


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


Subj:   Re: Calculate Percentages for a column
 
From:   Duraisamy, Kumar

Use derived table as below.

     SELECT A1.OFFICE, SUM(A1.HOURS) AS HOURS, (SUM(A1.HOURS) /HR)HRPCT FROM
     (SELECT
     SUM(A2.HOURS) FROM TABLE AS A2) DT(HR), TABLE AS A1
     WHERE A1.OFFICE LIKE 'AD%'
     GROUP BY A1.OFFICE;

Thanks,

Kumar Duraisamy



     
  <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