SET PAGESIZE 100
SET LINESIZE 220

PROMPT Agent AI question: "List all high-risk customers, margin, legal holds, renewals and support notes."

SELECT customer_id, customer_name, country, region, account_owner, risk_rating, revenue, margin, legal_hold
FROM dds_legacy_customers
WHERE risk_rating = 'HIGH'
ORDER BY customer_id;

SELECT c.contract_id, c.customer_id, c.contract_status, c.renewal_date, c.legal_clause, c.contract_value
FROM dds_legacy_contracts c
ORDER BY c.contract_id;

SELECT ticket_id, customer_id, assigned_group, severity, summary, private_note
FROM dds_legacy_tickets
ORDER BY ticket_id;

