lundi 4 mai 2015

sql Add up fieilds into one column and column

Im really struggling with this one. Looked at a few examples (more than a few to be honest) and I cannot wrap my wee brain around it. I want to sum two fields, show that total and then do a percent calculation. Is this possible?

asgn_id    pyt_itemcode asgn_type   Miles   Total Mile's    % of Total
   BLARE   COMILE          DRV      31083     31083            1.00 
   BOCA    COMILE          DRV      6930                       0.13 
   BOCA    COTEAM          DRV      44669    51599             0.87 
   BOWD    COTEAM          DRV      49941    49941             1.00 
   BOWN    COMILE          DRV      138                        0.00 
   BOWN    COTEAM          DRV      43021    43159             1.00 

Aucun commentaire:

Enregistrer un commentaire