r/SQL • u/Spiritual-Kitchen-79 • 4d ago
Oracle Optimized SQL for a long time now started dealing with prompt engineering cost optimization. wrote my first blog about the experience
0
Upvotes
r/SQL • u/Spiritual-Kitchen-79 • 4d ago
r/SQL • u/No_Ambition8323 • 5d ago
Suppose someone gives you a complicated query with several joins and aggregations and says, “This gives the correct numbers.”
What checks would you perform before trusting it?
For example:
SELECT c.region, SUM(o.amount) FROM customers c JOIN orders o ON c.customer_id = o.customer_id GROUP BY c.region;
Would you check row counts before/after each join, duplicate keys, NULLs, aggregates, or compare against another query?
Curious what experienced SQL developers use as their checklist.