Interview Guides
You are given a patient table and a billing claims table. Write a PostgreSQL query that calculates the denial rate by patient state, using the patient’s state from the patient table and the claim outcome from the claims table. Return one row per state with the total number of claims, the number of denied claims, and the denial rate as a percentage.