0

Would like to ask for help with this SQL problem i have. The goal is to get the total percentage of how many 1 are in the column

Table

im planning to get the percentage of the dispute lost using count. Here is the code that i used

SELECT ((
    SELECT count (dispute_lost) 
    FROM yellevate_data_2 
    WHERE dispute_lost =1)) AS Dispute_count,
    (count(dispute_lost)) AS Total_Dispute_count ,
    (((SELECT count (dispute_lost) 
    FROM yellevate_data_2 
    WHERE dispute_lost =1))/(
    count(dispute_lost)))*100 AS mult
    
FROM yellevate_data_2;

and here are the results

Result

the mult column should show 4.09 but it only displays 0

Reporter
  • 3,897
  • 5
  • 33
  • 47
Jayy
  • 11

0 Answers0