-- Approve the reviewed customer QA example for a grouped business-AU query.
-- Empty result sets remain valid executed query results.

UPDATE sg_qa_vector_example
   SET reference_status = 'APPROVED',
       inspection_status = 'VERIFIED',
       answer_text = 'Expected focus: aggregate business AU by the user-master country attribute. '
                   || 'Join CZN_CUSTOM_BIZ_USER_TXN to CZN_COMN_USER_MST by GUID and BASE_DT; filter BIZ_AU_FLAG=1 and EXPT_USER_YN=''N'', then group by LAST_CONN_COUNTRY_CD. '
                   || 'A successfully executed query with no country rows is a valid result, not a SQL failure. '
                   || 'Historical answer: no result rows.',
       inspection_note = 'Customer QA verified: country business-AU is a grouped join; an empty result is a valid query outcome.',
       verified_at = SYSTIMESTAMP,
       verified_by = 'SGMP_POC_METADATA_REVIEW'
 WHERE source_type = 'CUSTOMER_QA_BENCHMARK'
   AND source_case_id = 'CZN-05';

COMMIT;

SELECT example_id, reference_status, inspection_status, source_case_id, answer_text
  FROM sg_qa_vector_example
 WHERE source_type = 'CUSTOMER_QA_BENCHMARK'
   AND source_case_id = 'CZN-05';
