SELECT CASE WHEN
  (SELECT GROUP_CONCAT(COLUMN_NAME ORDER BY SEQ_IN_INDEX)
   FROM information_schema.STATISTICS
   WHERE TABLE_SCHEMA=DATABASE()
     AND TABLE_NAME='StdOpMaster'
     AND INDEX_NAME='IX_StdOpMaster')='tenant_id,StdOp,domain'
  AND
  (SELECT GROUP_CONCAT(COLUMN_NAME ORDER BY SEQ_IN_INDEX)
   FROM information_schema.STATISTICS
   WHERE TABLE_SCHEMA=DATABASE()
     AND TABLE_NAME='mdp_stg_s6_report'
     AND INDEX_NAME='uk_source_key')='tenant_id,source_system,source_table,source_biz_key'
  AND
  (SELECT COUNT(*)
   FROM (
     SELECT tenant_id,StdOp,domain
     FROM StdOpMaster
     GROUP BY tenant_id,StdOp,domain
     HAVING COUNT(*)>1
   ) duplicate_std_ops)=0
THEN 1 ELSE 0 END AS ok;
