CREATE OR REPLACE VIEW temp_compliances AS 
	SELECT 
		a.id                 as api, 
		a.compatibilityclass as compliance
	FROM 
		api a
	WHERE
		a.id NOT IN (SELECT api from apicollections WHERE param = 'overriding_compliance')
	UNION SELECT
		a.id as api, 
		ac.original as compliance
	FROM
		api a LEFT OUTER JOIN apicollections ac ON (ac.api = a.id) 
	WHERE
		ac.param = 'overriding_compliance';
