{"template_id": "T12", "question": "How many orders did each customer in Chennai place? Show name and count.", "gold_sql": "SELECT c.name, COUNT(o.id) FROM customers c LEFT JOIN orders o ON o.customer_id=c.id WHERE c.city='Chennai' GROUP BY c.id", "prompt": "Database schema (SQLite):\ncustomers(id, name, city, segment, signup_date)\nproducts(id, name, category, price)\norders(id, customer_id, order_date, status)\norder_items(id, order_id, product_id, quantity)\nWrite one SQLite SELECT query inside a ```sql block.\nQuestion: How many orders did each customer in Chennai place? Show name and count."} {"template_id": "T12", "question": "How many orders did each customer in Bengaluru place? Show name and count.", "gold_sql": "SELECT c.name, COUNT(o.id) FROM customers c LEFT JOIN orders o ON o.customer_id=c.id WHERE c.city='Bengaluru' GROUP BY c.id", "prompt": "Database schema (SQLite):\ncustomers(id, name, city, segment, signup_date)\nproducts(id, name, category, price)\norders(id, customer_id, order_date, status)\norder_items(id, order_id, product_id, quantity)\nWrite one SQLite SELECT query inside a ```sql block.\nQuestion: How many orders did each customer in Bengaluru place? Show name and count."} {"template_id": "T12", "question": "How many orders did each customer in Mumbai place? Show name and count.", "gold_sql": "SELECT c.name, COUNT(o.id) FROM customers c LEFT JOIN orders o ON o.customer_id=c.id WHERE c.city='Mumbai' GROUP BY c.id", "prompt": "Database schema (SQLite):\ncustomers(id, name, city, segment, signup_date)\nproducts(id, name, category, price)\norders(id, customer_id, order_date, status)\norder_items(id, order_id, product_id, quantity)\nWrite one SQLite SELECT query inside a ```sql block.\nQuestion: How many orders did each customer in Mumbai place? Show name and count."} {"template_id": "T12", "question": "How many orders did each customer in Delhi place? Show name and count.", "gold_sql": "SELECT c.name, COUNT(o.id) FROM customers c LEFT JOIN orders o ON o.customer_id=c.id WHERE c.city='Delhi' GROUP BY c.id", "prompt": "Database schema (SQLite):\ncustomers(id, name, city, segment, signup_date)\nproducts(id, name, category, price)\norders(id, customer_id, order_date, status)\norder_items(id, order_id, product_id, quantity)\nWrite one SQLite SELECT query inside a ```sql block.\nQuestion: How many orders did each customer in Delhi place? Show name and count."} {"template_id": "T12", "question": "How many orders did each customer in Hyderabad place? Show name and count.", "gold_sql": "SELECT c.name, COUNT(o.id) FROM customers c LEFT JOIN orders o ON o.customer_id=c.id WHERE c.city='Hyderabad' GROUP BY c.id", "prompt": "Database schema (SQLite):\ncustomers(id, name, city, segment, signup_date)\nproducts(id, name, category, price)\norders(id, customer_id, order_date, status)\norder_items(id, order_id, product_id, quantity)\nWrite one SQLite SELECT query inside a ```sql block.\nQuestion: How many orders did each customer in Hyderabad place? Show name and count."} {"template_id": "T12", "question": "How many orders did each customer in Pune place? Show name and count.", "gold_sql": "SELECT c.name, COUNT(o.id) FROM customers c LEFT JOIN orders o ON o.customer_id=c.id WHERE c.city='Pune' GROUP BY c.id", "prompt": "Database schema (SQLite):\ncustomers(id, name, city, segment, signup_date)\nproducts(id, name, category, price)\norders(id, customer_id, order_date, status)\norder_items(id, order_id, product_id, quantity)\nWrite one SQLite SELECT query inside a ```sql block.\nQuestion: How many orders did each customer in Pune place? Show name and count."} {"template_id": "T12", "question": "How many orders did each customer in Kolkata place? Show name and count.", "gold_sql": "SELECT c.name, COUNT(o.id) FROM customers c LEFT JOIN orders o ON o.customer_id=c.id WHERE c.city='Kolkata' GROUP BY c.id", "prompt": "Database schema (SQLite):\ncustomers(id, name, city, segment, signup_date)\nproducts(id, name, category, price)\norders(id, customer_id, order_date, status)\norder_items(id, order_id, product_id, quantity)\nWrite one SQLite SELECT query inside a ```sql block.\nQuestion: How many orders did each customer in Kolkata place? Show name and count."} {"template_id": "T12", "question": "How many orders did each customer in Ahmedabad place? Show name and count.", "gold_sql": "SELECT c.name, COUNT(o.id) FROM customers c LEFT JOIN orders o ON o.customer_id=c.id WHERE c.city='Ahmedabad' GROUP BY c.id", "prompt": "Database schema (SQLite):\ncustomers(id, name, city, segment, signup_date)\nproducts(id, name, category, price)\norders(id, customer_id, order_date, status)\norder_items(id, order_id, product_id, quantity)\nWrite one SQLite SELECT query inside a ```sql block.\nQuestion: How many orders did each customer in Ahmedabad place? Show name and count."} {"template_id": "T12", "question": "How many orders did each customer in Jaipur place? Show name and count.", "gold_sql": "SELECT c.name, COUNT(o.id) FROM customers c LEFT JOIN orders o ON o.customer_id=c.id WHERE c.city='Jaipur' GROUP BY c.id", "prompt": "Database schema (SQLite):\ncustomers(id, name, city, segment, signup_date)\nproducts(id, name, category, price)\norders(id, customer_id, order_date, status)\norder_items(id, order_id, product_id, quantity)\nWrite one SQLite SELECT query inside a ```sql block.\nQuestion: How many orders did each customer in Jaipur place? Show name and count."} {"template_id": "T12", "question": "How many orders did each customer in Kochi place? Show name and count.", "gold_sql": "SELECT c.name, COUNT(o.id) FROM customers c LEFT JOIN orders o ON o.customer_id=c.id WHERE c.city='Kochi' GROUP BY c.id", "prompt": "Database schema (SQLite):\ncustomers(id, name, city, segment, signup_date)\nproducts(id, name, category, price)\norders(id, customer_id, order_date, status)\norder_items(id, order_id, product_id, quantity)\nWrite one SQLite SELECT query inside a ```sql block.\nQuestion: How many orders did each customer in Kochi place? Show name and count."} {"template_id": "T12", "question": "How many orders did each customer in Coimbatore place? Show name and count.", "gold_sql": "SELECT c.name, COUNT(o.id) FROM customers c LEFT JOIN orders o ON o.customer_id=c.id WHERE c.city='Coimbatore' GROUP BY c.id", "prompt": "Database schema (SQLite):\ncustomers(id, name, city, segment, signup_date)\nproducts(id, name, category, price)\norders(id, customer_id, order_date, status)\norder_items(id, order_id, product_id, quantity)\nWrite one SQLite SELECT query inside a ```sql block.\nQuestion: How many orders did each customer in Coimbatore place? Show name and count."} {"template_id": "T12", "question": "How many orders did each customer in Lucknow place? Show name and count.", "gold_sql": "SELECT c.name, COUNT(o.id) FROM customers c LEFT JOIN orders o ON o.customer_id=c.id WHERE c.city='Lucknow' GROUP BY c.id", "prompt": "Database schema (SQLite):\ncustomers(id, name, city, segment, signup_date)\nproducts(id, name, category, price)\norders(id, customer_id, order_date, status)\norder_items(id, order_id, product_id, quantity)\nWrite one SQLite SELECT query inside a ```sql block.\nQuestion: How many orders did each customer in Lucknow place? Show name and count."} {"template_id": "T15", "question": "How many customers have never placed an order?", "gold_sql": "SELECT COUNT(*) FROM customers WHERE id NOT IN (SELECT customer_id FROM orders)", "prompt": "Database schema (SQLite):\ncustomers(id, name, city, segment, signup_date)\nproducts(id, name, category, price)\norders(id, customer_id, order_date, status)\norder_items(id, order_id, product_id, quantity)\nWrite one SQLite SELECT query inside a ```sql block.\nQuestion: How many customers have never placed an order?"} {"template_id": "T17", "question": "List the Electronics products that have never been ordered.", "gold_sql": "SELECT name FROM products WHERE category='Electronics' AND id NOT IN (SELECT product_id FROM order_items)", "prompt": "Database schema (SQLite):\ncustomers(id, name, city, segment, signup_date)\nproducts(id, name, category, price)\norders(id, customer_id, order_date, status)\norder_items(id, order_id, product_id, quantity)\nWrite one SQLite SELECT query inside a ```sql block.\nQuestion: List the Electronics products that have never been ordered."} {"template_id": "T17", "question": "List the Clothing products that have never been ordered.", "gold_sql": "SELECT name FROM products WHERE category='Clothing' AND id NOT IN (SELECT product_id FROM order_items)", "prompt": "Database schema (SQLite):\ncustomers(id, name, city, segment, signup_date)\nproducts(id, name, category, price)\norders(id, customer_id, order_date, status)\norder_items(id, order_id, product_id, quantity)\nWrite one SQLite SELECT query inside a ```sql block.\nQuestion: List the Clothing products that have never been ordered."} {"template_id": "T17", "question": "List the Sports products that have never been ordered.", "gold_sql": "SELECT name FROM products WHERE category='Sports' AND id NOT IN (SELECT product_id FROM order_items)", "prompt": "Database schema (SQLite):\ncustomers(id, name, city, segment, signup_date)\nproducts(id, name, category, price)\norders(id, customer_id, order_date, status)\norder_items(id, order_id, product_id, quantity)\nWrite one SQLite SELECT query inside a ```sql block.\nQuestion: List the Sports products that have never been ordered."} {"template_id": "T18", "question": "Which customer has spent the most in total? Give the name.", "gold_sql": "SELECT c.name FROM customers c JOIN orders o ON o.customer_id=c.id JOIN order_items oi ON oi.order_id=o.id JOIN products p ON p.id=oi.product_id GROUP BY c.id ORDER BY SUM(oi.quantity*p.price) DESC, c.id LIMIT 1", "prompt": "Database schema (SQLite):\ncustomers(id, name, city, segment, signup_date)\nproducts(id, name, category, price)\norders(id, customer_id, order_date, status)\norder_items(id, order_id, product_id, quantity)\nWrite one SQLite SELECT query inside a ```sql block.\nQuestion: Which customer has spent the most in total? Give the name."}