Quantcast
Channel: Transact-SQL forum
Viewing all articles
Browse latest Browse all 23857

How to get Percentage of 2 coulmns in SQL

$
0
0

Hi,

I have a table which looks like

Name         Apple          Oranges

Abc             10                100

XYZ             300               120

I want to calculate percentage so it should show me as

Name                 Apple                    Oranges

abc                       9                        91

XYZ                     71                        29

Any suggestions pls

Regards

               


Viewing all articles
Browse latest Browse all 23857

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>