Quantcast
Channel: Teradata Forums - Database
Viewing all articles
Browse latest Browse all 14773

find Percentage - forum topic by Zodiak

$
0
0

How do I find percentage
This is not working
Can anyone suggest?
 
SELECT DISTINCT a.apple, (CAST((Count(a.apple))/ (SELECT count(a.apple) from a) *100 AS DECIMAL (15,2) )) AS percentage
FROM a
GROUP BY a.apple;

Forums: 

Viewing all articles
Browse latest Browse all 14773

Trending Articles



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