CREATE OR REPLACE VIEW CUSTOMER_INFO AS
SELECT A.CUSTOMER_ID, A.NAME, B.COUNTRY_NAME, A.BUDGET, A.USED, COUNT(C.AUDIT_ID) ITEM_AUDIT
FROM CUSTOMER A LEFT JOIN COUNTRY B ON A.COUNTRY_CODE = B.COUNTRY_CODE
LEFT JOIN AUDIT_LOG C ON A.CUSTOMER_ID = C.CUSTOMER_ID
GROUP BY A.CUSTOMER_ID, A.NAME, B.COUNTRY_NAME, A.BUDGET, A.USED;