The lab director wants to know the abnormality rate for each test. For each test_name, return the total number of results, the number of abnormal results, and the abnormal percentage (rounded to 1 decimal). Only include tests with at least 5 results. Sort by abnormal rate descending.
Schema
🔑idINT
🔗visit_idINT
test_nameTEXT
result_valueTEXT
unitTEXT
reference_rangeTEXT
is_abnormalINT
tested_atTEXT
postgresql
Run your query to see results
Press Ctrl + Enter to execute