select plan_id,
t.medical_plan_description,
medical_plan_name,
medical_plan_type,
medical_carrier_name
min(month_key),
max(month_key),
count(*)
from source_data_table as mn
order by 1,2
group by 1,2,3,4,5,6
This query is failing. Tell us at least three reasons why.