-- Verificación INTERLINK WA2 v2.7
USE `interlink_crm`;
SELECT DATABASE() AS base_actual;
SELECT COUNT(*) AS politicas_activas FROM wa2_intent_policies WHERE active=1 AND source_pack='interlink_isp_v27';
SELECT COUNT(*) AS ejemplos_activos FROM wa2_intent_examples WHERE active=1 AND source_pack='interlink_isp_v27';
SELECT COUNT(*) AS conocimientos_activos FROM wa2_knowledge WHERE active=1 AND source_pack='interlink_isp_v27';
SELECT COUNT(*) AS casos_prueba_activos FROM wa2_ai_test_cases WHERE active=1 AND source_pack='interlink_isp_v27';
SELECT handler_intent,COUNT(*) AS ejemplos FROM wa2_intent_examples WHERE active=1 AND source_pack='interlink_isp_v27' GROUP BY handler_intent ORDER BY ejemplos DESC;
SELECT query_key,handler_intent,response_mode,active FROM wa2_intent_policies WHERE source_pack='interlink_isp_v27' ORDER BY handler_intent,query_key;
