I have the following query -
SELECT h.patient, CASE WHEN LENGTH(start_dt) = 8 THEN start_dt::DATE WHEN \'2020q4\' >= \'2020q2\' THE