-- Object-specific, data-driven guidance for comparison queries on a common fact table.
-- No game, prefix, ID, or physical per-game object is embedded in this annotation.

DECLARE
  v_result VARCHAR2(4000);
BEGIN
  v_result := sgmp_set_annotation(
    'SGMP_POC',
    'TABLE',
    'COMN_SALES_TXN',
    NULL,
    'Game fact scope: query this table only for plan targets marked ACTIVE_ALIAS. Derive target GAME_ID values through active COMN_GAME_ALIAS_BAS aliases rather than direct identifier or prefix literals. For a mixed request, retain the eligible target results and report other plan statuses separately; do not substitute or manufacture a target result.',
    'MULTI_TARGET_COMPARISON'
  );
  DBMS_OUTPUT.PUT_LINE(v_result);
END;
/

SELECT annotation_name, annotation_value
  FROM user_annotations_usage
 WHERE object_name = 'COMN_SALES_TXN'
   AND annotation_name = 'MULTI_TARGET_COMPARISON';
