Draft a SQL query from a data question and the database schema, with a short explanation of what it does.
Draft SQL to rank products by sales across stores.
Get a ranking SQL query in your chat thread, ready for review. See how the measure and ties determine each position.
Draft CASE queries that group sales metrics by stated rules.
You get a SQL CASE query that groups your metric by the rules you provide, plus clear explanations in the same request thread.