Was the question What is the percentage for each status value in the table?
You can use window function and get the correct value for each row, like this:
with input (TASK, STATUS) as (
SELECT 'MKw11sk', 'OPEN' UNION ALL
SELECT 'JIKL', 'CLOSED' UNION ALL
SELECT 'pp', 'DELETED' UNION ALL
SELECT 'qwert', 'PRESENT' UNION ALL
SELECT 'DDF', 'OPEN'
)
select *,
count(STATUS) over (partition by STATUS) * 100 / count(STATUS) over () as status_percent
from input;
returns
task |
status |
status_percent |
JIKL |
CLOSED |
20 |
MKw11sk |
OPEN |
40 |
DDF |
OPEN |
40 |
qwert |
PRESENT |
20 |
pp |
DELETED |
20 |
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…