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';
