LLM-to-SQL
The model writes the SQL itself.
what it wrote
SELECT r.name AS region,
median(s.net_paid) AS median_order
FROM sales s JOIN region r ON r.id = s.region_id
GROUP BY r.name median(s.net_paid) is the median of line items, not of orders. Fluent, plausible, wrong. And no row-level security.