79123891

Date: 2024-10-24 23:55:36
Score: 0.5
Natty:
Report link

We can also use Aggregate function of SUM and CASE statement to calculate the percentage:

SELECT 
    SUM(CASE WHEN phase = 'sold' THEN 1 
    ELSE 0
    END) * 100.0 / Count(*) as percent_sold
FROM table
Reasons:
  • Low length (0.5):
  • Has code block (-0.5):
  • Low reputation (0.5):
Posted by: sia