You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
SELECT COUNT(DISTINCT contract_code) AS number_of_contracts, insurance_category, EXTRACT (YEAR FROM end_date) AS expired_year
FROM contracts
WHERE (EXTRACT (YEAR FROM end_date)>=2016 AND EXTRACT (YEAR FROM end_date)<=2020) AND (EXTRACT (YEAR FROM start_date)<2016 OR EXTRACT (YEAR FROM start_date)>2020)
GROUP BY insurance_category,EXTRACT (YEAR FROM end_date)