Hi All , I would like to in one query from the same table of say first names count all the occurrences of the various first names in a column called thecount and create another column called percentage that give the percentage of the count of an individual of the sum of all the counts of first names so all fname sara is 10%
say select count(*) as thecount , fname, count(*)/sum(count(*)) as percentage and you get
thecount fname percentage
4 sara 10
19 mike
7 lou
10 sam
say select count(*) as thecount , fname, count(*)/sum(count(*)) as percentage and you get
thecount fname percentage
4 sara 10
19 mike
7 lou
10 sam
Comment