select sum(case when Column2 = 'somevalue' then Column1 else 0 end) * 100 / sum(Column1) from NAMES;
See this:-
Select percentage of rows that have a certain value – SQL
0
solved SQL for calculating percentage of values for same column [closed]
select sum(case when Column2 = 'somevalue' then Column1 else 0 end) * 100 / sum(Column1) from NAMES;
See this:-
Select percentage of rows that have a certain value – SQL
0
solved SQL for calculating percentage of values for same column [closed]