DataPilot V6 - Datasets
Collection
Benchmark, eval trajectories and training logs for DataPilot V6 • 2 items • Updated
template_id stringclasses 18
values | question stringlengths 33 79 | gold_sql stringlengths 46 165 | prompt stringlengths 298 344 |
|---|---|---|---|
T19 | How many orders did the customer 'Gautam Kumar' place? | SELECT COUNT(*) FROM orders o JOIN customers c ON c.id=o.customer_id WHERE c.name='Gautam Kumar' | Database schema (SQLite):
customers(id, name, city, segment, signup_date)
products(id, name, category, price)
orders(id, customer_id, order_date, status)
order_items(id, order_id, product_id, quantity)
Write one SQLite SELECT query inside a ```sql block.
Question: How many orders did the customer 'Gautam Kumar' place? |
T19 | How many orders did the customer 'Sanjay Sharma' place? | SELECT COUNT(*) FROM orders o JOIN customers c ON c.id=o.customer_id WHERE c.name='Sanjay Sharma' | Database schema (SQLite):
customers(id, name, city, segment, signup_date)
products(id, name, category, price)
orders(id, customer_id, order_date, status)
order_items(id, order_id, product_id, quantity)
Write one SQLite SELECT query inside a ```sql block.
Question: How many orders did the customer 'Sanjay Sharma' place? |
T04 | What is the average price of products in the Grocery category? | SELECT AVG(price) FROM products WHERE category='Grocery' | Database schema (SQLite):
customers(id, name, city, segment, signup_date)
products(id, name, category, price)
orders(id, customer_id, order_date, status)
order_items(id, order_id, product_id, quantity)
Write one SQLite SELECT query inside a ```sql block.
Question: What is the average price of products in the Grocery ca... |
T05 | List products in the Sports category priced above 500. | SELECT name FROM products WHERE category='Sports' AND price>500 | Database schema (SQLite):
customers(id, name, city, segment, signup_date)
products(id, name, category, price)
orders(id, customer_id, order_date, status)
order_items(id, order_id, product_id, quantity)
Write one SQLite SELECT query inside a ```sql block.
Question: List products in the Sports category priced above 500. |
T05 | List products in the Clothing category priced above 1500. | SELECT name FROM products WHERE category='Clothing' AND price>1500 | Database schema (SQLite):
customers(id, name, city, segment, signup_date)
products(id, name, category, price)
orders(id, customer_id, order_date, status)
order_items(id, order_id, product_id, quantity)
Write one SQLite SELECT query inside a ```sql block.
Question: List products in the Clothing category priced above 150... |
T21 | List customers in Kolkata who are in the Retail segment. | SELECT name FROM customers WHERE city='Kolkata' AND segment='Retail' | Database schema (SQLite):
customers(id, name, city, segment, signup_date)
products(id, name, category, price)
orders(id, customer_id, order_date, status)
order_items(id, order_id, product_id, quantity)
Write one SQLite SELECT query inside a ```sql block.
Question: List customers in Kolkata who are in the Retail segment... |
T21 | List customers in Bengaluru who are in the Startup segment. | SELECT name FROM customers WHERE city='Bengaluru' AND segment='Startup' | Database schema (SQLite):
customers(id, name, city, segment, signup_date)
products(id, name, category, price)
orders(id, customer_id, order_date, status)
order_items(id, order_id, product_id, quantity)
Write one SQLite SELECT query inside a ```sql block.
Question: List customers in Bengaluru who are in the Startup segm... |
T01 | How many customers live in Ahmedabad? | SELECT COUNT(*) FROM customers WHERE city='Ahmedabad' | Database schema (SQLite):
customers(id, name, city, segment, signup_date)
products(id, name, category, price)
orders(id, customer_id, order_date, status)
order_items(id, order_id, product_id, quantity)
Write one SQLite SELECT query inside a ```sql block.
Question: How many customers live in Ahmedabad? |
T07 | What is the total quantity sold of the product 'Shoes Mini'? | SELECT SUM(oi.quantity) FROM order_items oi JOIN products p ON p.id=oi.product_id WHERE p.name='Shoes Mini' | Database schema (SQLite):
customers(id, name, city, segment, signup_date)
products(id, name, category, price)
orders(id, customer_id, order_date, status)
order_items(id, order_id, product_id, quantity)
Write one SQLite SELECT query inside a ```sql block.
Question: What is the total quantity sold of the product 'Shoes M... |
T19 | How many orders did the customer 'Nisha Menon' place? | SELECT COUNT(*) FROM orders o JOIN customers c ON c.id=o.customer_id WHERE c.name='Nisha Menon' | Database schema (SQLite):
customers(id, name, city, segment, signup_date)
products(id, name, category, price)
orders(id, customer_id, order_date, status)
order_items(id, order_id, product_id, quantity)
Write one SQLite SELECT query inside a ```sql block.
Question: How many orders did the customer 'Nisha Menon' place? |
T21 | List customers in Pune who are in the Corporate segment. | SELECT name FROM customers WHERE city='Pune' AND segment='Corporate' | Database schema (SQLite):
customers(id, name, city, segment, signup_date)
products(id, name, category, price)
orders(id, customer_id, order_date, status)
order_items(id, order_id, product_id, quantity)
Write one SQLite SELECT query inside a ```sql block.
Question: List customers in Pune who are in the Corporate segment... |
T19 | How many orders did the customer 'Anita Sharma' place? | SELECT COUNT(*) FROM orders o JOIN customers c ON c.id=o.customer_id WHERE c.name='Anita Sharma' | Database schema (SQLite):
customers(id, name, city, segment, signup_date)
products(id, name, category, price)
orders(id, customer_id, order_date, status)
order_items(id, order_id, product_id, quantity)
Write one SQLite SELECT query inside a ```sql block.
Question: How many orders did the customer 'Anita Sharma' place? |
T07 | What is the total quantity sold of the product 'Sofa Plus'? | SELECT SUM(oi.quantity) FROM order_items oi JOIN products p ON p.id=oi.product_id WHERE p.name='Sofa Plus' | Database schema (SQLite):
customers(id, name, city, segment, signup_date)
products(id, name, category, price)
orders(id, customer_id, order_date, status)
order_items(id, order_id, product_id, quantity)
Write one SQLite SELECT query inside a ```sql block.
Question: What is the total quantity sold of the product 'Sofa Pl... |
T23 | How many orders with status 'Delivered' were placed in 2023? | SELECT COUNT(*) FROM orders WHERE status='Delivered' AND strftime('%Y', order_date)='2023' | Database schema (SQLite):
customers(id, name, city, segment, signup_date)
products(id, name, category, price)
orders(id, customer_id, order_date, status)
order_items(id, order_id, product_id, quantity)
Write one SQLite SELECT query inside a ```sql block.
Question: How many orders with status 'Delivered' were placed in ... |
T07 | What is the total quantity sold of the product 'Speaker Max'? | SELECT SUM(oi.quantity) FROM order_items oi JOIN products p ON p.id=oi.product_id WHERE p.name='Speaker Max' | Database schema (SQLite):
customers(id, name, city, segment, signup_date)
products(id, name, category, price)
orders(id, customer_id, order_date, status)
order_items(id, order_id, product_id, quantity)
Write one SQLite SELECT query inside a ```sql block.
Question: What is the total quantity sold of the product 'Speaker... |
T07 | What is the total quantity sold of the product 'Camera Plus'? | SELECT SUM(oi.quantity) FROM order_items oi JOIN products p ON p.id=oi.product_id WHERE p.name='Camera Plus' | Database schema (SQLite):
customers(id, name, city, segment, signup_date)
products(id, name, category, price)
orders(id, customer_id, order_date, status)
order_items(id, order_id, product_id, quantity)
Write one SQLite SELECT query inside a ```sql block.
Question: What is the total quantity sold of the product 'Camera ... |
T07 | What is the total quantity sold of the product 'Racket Plus'? | SELECT SUM(oi.quantity) FROM order_items oi JOIN products p ON p.id=oi.product_id WHERE p.name='Racket Plus' | Database schema (SQLite):
customers(id, name, city, segment, signup_date)
products(id, name, category, price)
orders(id, customer_id, order_date, status)
order_items(id, order_id, product_id, quantity)
Write one SQLite SELECT query inside a ```sql block.
Question: What is the total quantity sold of the product 'Racket ... |
T21 | List customers in Chennai who are in the Corporate segment. | SELECT name FROM customers WHERE city='Chennai' AND segment='Corporate' | Database schema (SQLite):
customers(id, name, city, segment, signup_date)
products(id, name, category, price)
orders(id, customer_id, order_date, status)
order_items(id, order_id, product_id, quantity)
Write one SQLite SELECT query inside a ```sql block.
Question: List customers in Chennai who are in the Corporate segm... |
T03 | How many orders have status 'Delivered'? | SELECT COUNT(*) FROM orders WHERE status='Delivered' | Database schema (SQLite):
customers(id, name, city, segment, signup_date)
products(id, name, category, price)
orders(id, customer_id, order_date, status)
order_items(id, order_id, product_id, quantity)
Write one SQLite SELECT query inside a ```sql block.
Question: How many orders have status 'Delivered'? |
T01 | How many customers live in Jaipur? | SELECT COUNT(*) FROM customers WHERE city='Jaipur' | Database schema (SQLite):
customers(id, name, city, segment, signup_date)
products(id, name, category, price)
orders(id, customer_id, order_date, status)
order_items(id, order_id, product_id, quantity)
Write one SQLite SELECT query inside a ```sql block.
Question: How many customers live in Jaipur? |
T19 | How many orders did the customer 'Rekha Nair' place? | SELECT COUNT(*) FROM orders o JOIN customers c ON c.id=o.customer_id WHERE c.name='Rekha Nair' | Database schema (SQLite):
customers(id, name, city, segment, signup_date)
products(id, name, category, price)
orders(id, customer_id, order_date, status)
order_items(id, order_id, product_id, quantity)
Write one SQLite SELECT query inside a ```sql block.
Question: How many orders did the customer 'Rekha Nair' place? |
T13 | Which 5 products have the highest price? List their names. | SELECT name FROM products ORDER BY price DESC LIMIT 5 | Database schema (SQLite):
customers(id, name, city, segment, signup_date)
products(id, name, category, price)
orders(id, customer_id, order_date, status)
order_items(id, order_id, product_id, quantity)
Write one SQLite SELECT query inside a ```sql block.
Question: Which 5 products have the highest price? List their nam... |
T21 | List customers in Lucknow who are in the Corporate segment. | SELECT name FROM customers WHERE city='Lucknow' AND segment='Corporate' | Database schema (SQLite):
customers(id, name, city, segment, signup_date)
products(id, name, category, price)
orders(id, customer_id, order_date, status)
order_items(id, order_id, product_id, quantity)
Write one SQLite SELECT query inside a ```sql block.
Question: List customers in Lucknow who are in the Corporate segm... |
T20 | What is the total quantity of items ordered by customers in Lucknow? | SELECT SUM(oi.quantity) FROM customers c JOIN orders o ON o.customer_id=c.id JOIN order_items oi ON oi.order_id=o.id WHERE c.city='Lucknow' | Database schema (SQLite):
customers(id, name, city, segment, signup_date)
products(id, name, category, price)
orders(id, customer_id, order_date, status)
order_items(id, order_id, product_id, quantity)
Write one SQLite SELECT query inside a ```sql block.
Question: What is the total quantity of items ordered by customer... |
T07 | What is the total quantity sold of the product 'Table Classic'? | SELECT SUM(oi.quantity) FROM order_items oi JOIN products p ON p.id=oi.product_id WHERE p.name='Table Classic' | Database schema (SQLite):
customers(id, name, city, segment, signup_date)
products(id, name, category, price)
orders(id, customer_id, order_date, status)
order_items(id, order_id, product_id, quantity)
Write one SQLite SELECT query inside a ```sql block.
Question: What is the total quantity sold of the product 'Table C... |
T13 | Which 7 products have the highest price? List their names. | SELECT name FROM products ORDER BY price DESC LIMIT 7 | Database schema (SQLite):
customers(id, name, city, segment, signup_date)
products(id, name, category, price)
orders(id, customer_id, order_date, status)
order_items(id, order_id, product_id, quantity)
Write one SQLite SELECT query inside a ```sql block.
Question: Which 7 products have the highest price? List their nam... |
T09 | Which customers in Coimbatore have placed at least one order? List their names. | SELECT DISTINCT c.name FROM customers c JOIN orders o ON o.customer_id=c.id WHERE c.city='Coimbatore' | Database schema (SQLite):
customers(id, name, city, segment, signup_date)
products(id, name, category, price)
orders(id, customer_id, order_date, status)
order_items(id, order_id, product_id, quantity)
Write one SQLite SELECT query inside a ```sql block.
Question: Which customers in Coimbatore have placed at least one ... |
T19 | How many orders did the customer 'Rekha Patel' place? | SELECT COUNT(*) FROM orders o JOIN customers c ON c.id=o.customer_id WHERE c.name='Rekha Patel' | Database schema (SQLite):
customers(id, name, city, segment, signup_date)
products(id, name, category, price)
orders(id, customer_id, order_date, status)
order_items(id, order_id, product_id, quantity)
Write one SQLite SELECT query inside a ```sql block.
Question: How many orders did the customer 'Rekha Patel' place? |
T19 | How many orders did the customer 'Vikram Iyer' place? | SELECT COUNT(*) FROM orders o JOIN customers c ON c.id=o.customer_id WHERE c.name='Vikram Iyer' | Database schema (SQLite):
customers(id, name, city, segment, signup_date)
products(id, name, category, price)
orders(id, customer_id, order_date, status)
order_items(id, order_id, product_id, quantity)
Write one SQLite SELECT query inside a ```sql block.
Question: How many orders did the customer 'Vikram Iyer' place? |
T19 | How many orders did the customer 'Priya Singh' place? | SELECT COUNT(*) FROM orders o JOIN customers c ON c.id=o.customer_id WHERE c.name='Priya Singh' | Database schema (SQLite):
customers(id, name, city, segment, signup_date)
products(id, name, category, price)
orders(id, customer_id, order_date, status)
order_items(id, order_id, product_id, quantity)
Write one SQLite SELECT query inside a ```sql block.
Question: How many orders did the customer 'Priya Singh' place? |
T05 | List products in the Electronics category priced above 2500. | SELECT name FROM products WHERE category='Electronics' AND price>2500 | Database schema (SQLite):
customers(id, name, city, segment, signup_date)
products(id, name, category, price)
orders(id, customer_id, order_date, status)
order_items(id, order_id, product_id, quantity)
Write one SQLite SELECT query inside a ```sql block.
Question: List products in the Electronics category priced above ... |
T01 | How many customers live in Hyderabad? | SELECT COUNT(*) FROM customers WHERE city='Hyderabad' | Database schema (SQLite):
customers(id, name, city, segment, signup_date)
products(id, name, category, price)
orders(id, customer_id, order_date, status)
order_items(id, order_id, product_id, quantity)
Write one SQLite SELECT query inside a ```sql block.
Question: How many customers live in Hyderabad? |
T09 | Which customers in Bengaluru have placed at least one order? List their names. | SELECT DISTINCT c.name FROM customers c JOIN orders o ON o.customer_id=c.id WHERE c.city='Bengaluru' | Database schema (SQLite):
customers(id, name, city, segment, signup_date)
products(id, name, category, price)
orders(id, customer_id, order_date, status)
order_items(id, order_id, product_id, quantity)
Write one SQLite SELECT query inside a ```sql block.
Question: Which customers in Bengaluru have placed at least one o... |
T03 | How many orders have status 'Cancelled'? | SELECT COUNT(*) FROM orders WHERE status='Cancelled' | Database schema (SQLite):
customers(id, name, city, segment, signup_date)
products(id, name, category, price)
orders(id, customer_id, order_date, status)
order_items(id, order_id, product_id, quantity)
Write one SQLite SELECT query inside a ```sql block.
Question: How many orders have status 'Cancelled'? |
T04 | What is the average price of products in the Furniture category? | SELECT AVG(price) FROM products WHERE category='Furniture' | Database schema (SQLite):
customers(id, name, city, segment, signup_date)
products(id, name, category, price)
orders(id, customer_id, order_date, status)
order_items(id, order_id, product_id, quantity)
Write one SQLite SELECT query inside a ```sql block.
Question: What is the average price of products in the Furniture ... |
T23 | How many orders with status 'Cancelled' were placed in 2025? | SELECT COUNT(*) FROM orders WHERE status='Cancelled' AND strftime('%Y', order_date)='2025' | Database schema (SQLite):
customers(id, name, city, segment, signup_date)
products(id, name, category, price)
orders(id, customer_id, order_date, status)
order_items(id, order_id, product_id, quantity)
Write one SQLite SELECT query inside a ```sql block.
Question: How many orders with status 'Cancelled' were placed in ... |
T20 | What is the total quantity of items ordered by customers in Coimbatore? | SELECT SUM(oi.quantity) FROM customers c JOIN orders o ON o.customer_id=c.id JOIN order_items oi ON oi.order_id=o.id WHERE c.city='Coimbatore' | Database schema (SQLite):
customers(id, name, city, segment, signup_date)
products(id, name, category, price)
orders(id, customer_id, order_date, status)
order_items(id, order_id, product_id, quantity)
Write one SQLite SELECT query inside a ```sql block.
Question: What is the total quantity of items ordered by customer... |
T05 | List products in the Grocery category priced above 1500. | SELECT name FROM products WHERE category='Grocery' AND price>1500 | Database schema (SQLite):
customers(id, name, city, segment, signup_date)
products(id, name, category, price)
orders(id, customer_id, order_date, status)
order_items(id, order_id, product_id, quantity)
Write one SQLite SELECT query inside a ```sql block.
Question: List products in the Grocery category priced above 1500... |
T11 | What is the total revenue in 2025? | SELECT SUM(oi.quantity*p.price) FROM orders o JOIN order_items oi ON oi.order_id=o.id JOIN products p ON p.id=oi.product_id WHERE strftime('%Y', o.order_date)='2025' | Database schema (SQLite):
customers(id, name, city, segment, signup_date)
products(id, name, category, price)
orders(id, customer_id, order_date, status)
order_items(id, order_id, product_id, quantity)
Write one SQLite SELECT query inside a ```sql block.
Question: What is the total revenue in 2025? |
T19 | How many orders did the customer 'Dinesh Singh' place? | SELECT COUNT(*) FROM orders o JOIN customers c ON c.id=o.customer_id WHERE c.name='Dinesh Singh' | Database schema (SQLite):
customers(id, name, city, segment, signup_date)
products(id, name, category, price)
orders(id, customer_id, order_date, status)
order_items(id, order_id, product_id, quantity)
Write one SQLite SELECT query inside a ```sql block.
Question: How many orders did the customer 'Dinesh Singh' place? |
T03 | How many orders have status 'Pending'? | SELECT COUNT(*) FROM orders WHERE status='Pending' | Database schema (SQLite):
customers(id, name, city, segment, signup_date)
products(id, name, category, price)
orders(id, customer_id, order_date, status)
order_items(id, order_id, product_id, quantity)
Write one SQLite SELECT query inside a ```sql block.
Question: How many orders have status 'Pending'? |
T23 | How many orders with status 'Shipped' were placed in 2023? | SELECT COUNT(*) FROM orders WHERE status='Shipped' AND strftime('%Y', order_date)='2023' | Database schema (SQLite):
customers(id, name, city, segment, signup_date)
products(id, name, category, price)
orders(id, customer_id, order_date, status)
order_items(id, order_id, product_id, quantity)
Write one SQLite SELECT query inside a ```sql block.
Question: How many orders with status 'Shipped' were placed in 20... |
T07 | What is the total quantity sold of the product 'Desk Plus'? | SELECT SUM(oi.quantity) FROM order_items oi JOIN products p ON p.id=oi.product_id WHERE p.name='Desk Plus' | Database schema (SQLite):
customers(id, name, city, segment, signup_date)
products(id, name, category, price)
orders(id, customer_id, order_date, status)
order_items(id, order_id, product_id, quantity)
Write one SQLite SELECT query inside a ```sql block.
Question: What is the total quantity sold of the product 'Desk Pl... |
T22 | How many products cost less than 2000? | SELECT COUNT(*) FROM products WHERE price<2000 | Database schema (SQLite):
customers(id, name, city, segment, signup_date)
products(id, name, category, price)
orders(id, customer_id, order_date, status)
order_items(id, order_id, product_id, quantity)
Write one SQLite SELECT query inside a ```sql block.
Question: How many products cost less than 2000? |
T05 | List products in the Electronics category priced above 500. | SELECT name FROM products WHERE category='Electronics' AND price>500 | Database schema (SQLite):
customers(id, name, city, segment, signup_date)
products(id, name, category, price)
orders(id, customer_id, order_date, status)
order_items(id, order_id, product_id, quantity)
Write one SQLite SELECT query inside a ```sql block.
Question: List products in the Electronics category priced above ... |
T09 | Which customers in Kochi have placed at least one order? List their names. | SELECT DISTINCT c.name FROM customers c JOIN orders o ON o.customer_id=c.id WHERE c.city='Kochi' | Database schema (SQLite):
customers(id, name, city, segment, signup_date)
products(id, name, category, price)
orders(id, customer_id, order_date, status)
order_items(id, order_id, product_id, quantity)
Write one SQLite SELECT query inside a ```sql block.
Question: Which customers in Kochi have placed at least one order... |
T07 | What is the total quantity sold of the product 'Chair Plus'? | SELECT SUM(oi.quantity) FROM order_items oi JOIN products p ON p.id=oi.product_id WHERE p.name='Chair Plus' | Database schema (SQLite):
customers(id, name, city, segment, signup_date)
products(id, name, category, price)
orders(id, customer_id, order_date, status)
order_items(id, order_id, product_id, quantity)
Write one SQLite SELECT query inside a ```sql block.
Question: What is the total quantity sold of the product 'Chair P... |
T04 | What is the average price of products in the Clothing category? | SELECT AVG(price) FROM products WHERE category='Clothing' | Database schema (SQLite):
customers(id, name, city, segment, signup_date)
products(id, name, category, price)
orders(id, customer_id, order_date, status)
order_items(id, order_id, product_id, quantity)
Write one SQLite SELECT query inside a ```sql block.
Question: What is the average price of products in the Clothing c... |
T11 | What is the total revenue in 2024? | SELECT SUM(oi.quantity*p.price) FROM orders o JOIN order_items oi ON oi.order_id=o.id JOIN products p ON p.id=oi.product_id WHERE strftime('%Y', o.order_date)='2024' | Database schema (SQLite):
customers(id, name, city, segment, signup_date)
products(id, name, category, price)
orders(id, customer_id, order_date, status)
order_items(id, order_id, product_id, quantity)
Write one SQLite SELECT query inside a ```sql block.
Question: What is the total revenue in 2024? |
T19 | How many orders did the customer 'Arjun Kumar' place? | SELECT COUNT(*) FROM orders o JOIN customers c ON c.id=o.customer_id WHERE c.name='Arjun Kumar' | Database schema (SQLite):
customers(id, name, city, segment, signup_date)
products(id, name, category, price)
orders(id, customer_id, order_date, status)
order_items(id, order_id, product_id, quantity)
Write one SQLite SELECT query inside a ```sql block.
Question: How many orders did the customer 'Arjun Kumar' place? |
T08 | What is the total revenue from Furniture products? | SELECT SUM(oi.quantity*p.price) FROM order_items oi JOIN products p ON p.id=oi.product_id WHERE p.category='Furniture' | Database schema (SQLite):
customers(id, name, city, segment, signup_date)
products(id, name, category, price)
orders(id, customer_id, order_date, status)
order_items(id, order_id, product_id, quantity)
Write one SQLite SELECT query inside a ```sql block.
Question: What is the total revenue from Furniture products? |
T20 | What is the total quantity of items ordered by customers in Delhi? | SELECT SUM(oi.quantity) FROM customers c JOIN orders o ON o.customer_id=c.id JOIN order_items oi ON oi.order_id=o.id WHERE c.city='Delhi' | Database schema (SQLite):
customers(id, name, city, segment, signup_date)
products(id, name, category, price)
orders(id, customer_id, order_date, status)
order_items(id, order_id, product_id, quantity)
Write one SQLite SELECT query inside a ```sql block.
Question: What is the total quantity of items ordered by customer... |
T21 | List customers in Mumbai who are in the Corporate segment. | SELECT name FROM customers WHERE city='Mumbai' AND segment='Corporate' | Database schema (SQLite):
customers(id, name, city, segment, signup_date)
products(id, name, category, price)
orders(id, customer_id, order_date, status)
order_items(id, order_id, product_id, quantity)
Write one SQLite SELECT query inside a ```sql block.
Question: List customers in Mumbai who are in the Corporate segme... |
T20 | What is the total quantity of items ordered by customers in Ahmedabad? | SELECT SUM(oi.quantity) FROM customers c JOIN orders o ON o.customer_id=c.id JOIN order_items oi ON oi.order_id=o.id WHERE c.city='Ahmedabad' | Database schema (SQLite):
customers(id, name, city, segment, signup_date)
products(id, name, category, price)
orders(id, customer_id, order_date, status)
order_items(id, order_id, product_id, quantity)
Write one SQLite SELECT query inside a ```sql block.
Question: What is the total quantity of items ordered by customer... |
T08 | What is the total revenue from Sports products? | SELECT SUM(oi.quantity*p.price) FROM order_items oi JOIN products p ON p.id=oi.product_id WHERE p.category='Sports' | Database schema (SQLite):
customers(id, name, city, segment, signup_date)
products(id, name, category, price)
orders(id, customer_id, order_date, status)
order_items(id, order_id, product_id, quantity)
Write one SQLite SELECT query inside a ```sql block.
Question: What is the total revenue from Sports products? |
T23 | How many orders with status 'Pending' were placed in 2025? | SELECT COUNT(*) FROM orders WHERE status='Pending' AND strftime('%Y', order_date)='2025' | Database schema (SQLite):
customers(id, name, city, segment, signup_date)
products(id, name, category, price)
orders(id, customer_id, order_date, status)
order_items(id, order_id, product_id, quantity)
Write one SQLite SELECT query inside a ```sql block.
Question: How many orders with status 'Pending' were placed in 20... |
T01 | How many customers live in Kolkata? | SELECT COUNT(*) FROM customers WHERE city='Kolkata' | Database schema (SQLite):
customers(id, name, city, segment, signup_date)
products(id, name, category, price)
orders(id, customer_id, order_date, status)
order_items(id, order_id, product_id, quantity)
Write one SQLite SELECT query inside a ```sql block.
Question: How many customers live in Kolkata? |
T19 | How many orders did the customer 'Pooja Das' place? | SELECT COUNT(*) FROM orders o JOIN customers c ON c.id=o.customer_id WHERE c.name='Pooja Das' | Database schema (SQLite):
customers(id, name, city, segment, signup_date)
products(id, name, category, price)
orders(id, customer_id, order_date, status)
order_items(id, order_id, product_id, quantity)
Write one SQLite SELECT query inside a ```sql block.
Question: How many orders did the customer 'Pooja Das' place? |
T23 | How many orders with status 'Pending' were placed in 2024? | SELECT COUNT(*) FROM orders WHERE status='Pending' AND strftime('%Y', order_date)='2024' | Database schema (SQLite):
customers(id, name, city, segment, signup_date)
products(id, name, category, price)
orders(id, customer_id, order_date, status)
order_items(id, order_id, product_id, quantity)
Write one SQLite SELECT query inside a ```sql block.
Question: How many orders with status 'Pending' were placed in 20... |
T07 | What is the total quantity sold of the product 'Spices Lite'? | SELECT SUM(oi.quantity) FROM order_items oi JOIN products p ON p.id=oi.product_id WHERE p.name='Spices Lite' | Database schema (SQLite):
customers(id, name, city, segment, signup_date)
products(id, name, category, price)
orders(id, customer_id, order_date, status)
order_items(id, order_id, product_id, quantity)
Write one SQLite SELECT query inside a ```sql block.
Question: What is the total quantity sold of the product 'Spices ... |
T05 | List products in the Furniture category priced above 2500. | SELECT name FROM products WHERE category='Furniture' AND price>2500 | Database schema (SQLite):
customers(id, name, city, segment, signup_date)
products(id, name, category, price)
orders(id, customer_id, order_date, status)
order_items(id, order_id, product_id, quantity)
Write one SQLite SELECT query inside a ```sql block.
Question: List products in the Furniture category priced above 25... |
T21 | List customers in Ahmedabad who are in the Startup segment. | SELECT name FROM customers WHERE city='Ahmedabad' AND segment='Startup' | Database schema (SQLite):
customers(id, name, city, segment, signup_date)
products(id, name, category, price)
orders(id, customer_id, order_date, status)
order_items(id, order_id, product_id, quantity)
Write one SQLite SELECT query inside a ```sql block.
Question: List customers in Ahmedabad who are in the Startup segm... |
T20 | What is the total quantity of items ordered by customers in Mumbai? | SELECT SUM(oi.quantity) FROM customers c JOIN orders o ON o.customer_id=c.id JOIN order_items oi ON oi.order_id=o.id WHERE c.city='Mumbai' | Database schema (SQLite):
customers(id, name, city, segment, signup_date)
products(id, name, category, price)
orders(id, customer_id, order_date, status)
order_items(id, order_id, product_id, quantity)
Write one SQLite SELECT query inside a ```sql block.
Question: What is the total quantity of items ordered by customer... |
T20 | What is the total quantity of items ordered by customers in Kochi? | SELECT SUM(oi.quantity) FROM customers c JOIN orders o ON o.customer_id=c.id JOIN order_items oi ON oi.order_id=o.id WHERE c.city='Kochi' | Database schema (SQLite):
customers(id, name, city, segment, signup_date)
products(id, name, category, price)
orders(id, customer_id, order_date, status)
order_items(id, order_id, product_id, quantity)
Write one SQLite SELECT query inside a ```sql block.
Question: What is the total quantity of items ordered by customer... |
T05 | List products in the Furniture category priced above 1500. | SELECT name FROM products WHERE category='Furniture' AND price>1500 | Database schema (SQLite):
customers(id, name, city, segment, signup_date)
products(id, name, category, price)
orders(id, customer_id, order_date, status)
order_items(id, order_id, product_id, quantity)
Write one SQLite SELECT query inside a ```sql block.
Question: List products in the Furniture category priced above 15... |
T10 | How many orders were placed in 2025? | SELECT COUNT(*) FROM orders WHERE strftime('%Y', order_date)='2025' | Database schema (SQLite):
customers(id, name, city, segment, signup_date)
products(id, name, category, price)
orders(id, customer_id, order_date, status)
order_items(id, order_id, product_id, quantity)
Write one SQLite SELECT query inside a ```sql block.
Question: How many orders were placed in 2025? |
T07 | What is the total quantity sold of the product 'Laptop Classic'? | SELECT SUM(oi.quantity) FROM order_items oi JOIN products p ON p.id=oi.product_id WHERE p.name='Laptop Classic' | Database schema (SQLite):
customers(id, name, city, segment, signup_date)
products(id, name, category, price)
orders(id, customer_id, order_date, status)
order_items(id, order_id, product_id, quantity)
Write one SQLite SELECT query inside a ```sql block.
Question: What is the total quantity sold of the product 'Laptop ... |
T09 | Which customers in Lucknow have placed at least one order? List their names. | SELECT DISTINCT c.name FROM customers c JOIN orders o ON o.customer_id=c.id WHERE c.city='Lucknow' | Database schema (SQLite):
customers(id, name, city, segment, signup_date)
products(id, name, category, price)
orders(id, customer_id, order_date, status)
order_items(id, order_id, product_id, quantity)
Write one SQLite SELECT query inside a ```sql block.
Question: Which customers in Lucknow have placed at least one ord... |
T07 | What is the total quantity sold of the product 'Tea Plus'? | SELECT SUM(oi.quantity) FROM order_items oi JOIN products p ON p.id=oi.product_id WHERE p.name='Tea Plus' | Database schema (SQLite):
customers(id, name, city, segment, signup_date)
products(id, name, category, price)
orders(id, customer_id, order_date, status)
order_items(id, order_id, product_id, quantity)
Write one SQLite SELECT query inside a ```sql block.
Question: What is the total quantity sold of the product 'Tea Plu... |
T07 | What is the total quantity sold of the product 'Shelf Pro'? | SELECT SUM(oi.quantity) FROM order_items oi JOIN products p ON p.id=oi.product_id WHERE p.name='Shelf Pro' | Database schema (SQLite):
customers(id, name, city, segment, signup_date)
products(id, name, category, price)
orders(id, customer_id, order_date, status)
order_items(id, order_id, product_id, quantity)
Write one SQLite SELECT query inside a ```sql block.
Question: What is the total quantity sold of the product 'Shelf P... |
T04 | What is the average price of products in the Electronics category? | SELECT AVG(price) FROM products WHERE category='Electronics' | Database schema (SQLite):
customers(id, name, city, segment, signup_date)
products(id, name, category, price)
orders(id, customer_id, order_date, status)
order_items(id, order_id, product_id, quantity)
Write one SQLite SELECT query inside a ```sql block.
Question: What is the average price of products in the Electronic... |
T01 | How many customers live in Lucknow? | SELECT COUNT(*) FROM customers WHERE city='Lucknow' | Database schema (SQLite):
customers(id, name, city, segment, signup_date)
products(id, name, category, price)
orders(id, customer_id, order_date, status)
order_items(id, order_id, product_id, quantity)
Write one SQLite SELECT query inside a ```sql block.
Question: How many customers live in Lucknow? |
T19 | How many orders did the customer 'Ravi Iyer' place? | SELECT COUNT(*) FROM orders o JOIN customers c ON c.id=o.customer_id WHERE c.name='Ravi Iyer' | Database schema (SQLite):
customers(id, name, city, segment, signup_date)
products(id, name, category, price)
orders(id, customer_id, order_date, status)
order_items(id, order_id, product_id, quantity)
Write one SQLite SELECT query inside a ```sql block.
Question: How many orders did the customer 'Ravi Iyer' place? |
T19 | How many orders did the customer 'Ravi Rao' place? | SELECT COUNT(*) FROM orders o JOIN customers c ON c.id=o.customer_id WHERE c.name='Ravi Rao' | Database schema (SQLite):
customers(id, name, city, segment, signup_date)
products(id, name, category, price)
orders(id, customer_id, order_date, status)
order_items(id, order_id, product_id, quantity)
Write one SQLite SELECT query inside a ```sql block.
Question: How many orders did the customer 'Ravi Rao' place? |
T05 | List products in the Sports category priced above 1500. | SELECT name FROM products WHERE category='Sports' AND price>1500 | Database schema (SQLite):
customers(id, name, city, segment, signup_date)
products(id, name, category, price)
orders(id, customer_id, order_date, status)
order_items(id, order_id, product_id, quantity)
Write one SQLite SELECT query inside a ```sql block.
Question: List products in the Sports category priced above 1500. |
T20 | What is the total quantity of items ordered by customers in Hyderabad? | SELECT SUM(oi.quantity) FROM customers c JOIN orders o ON o.customer_id=c.id JOIN order_items oi ON oi.order_id=o.id WHERE c.city='Hyderabad' | Database schema (SQLite):
customers(id, name, city, segment, signup_date)
products(id, name, category, price)
orders(id, customer_id, order_date, status)
order_items(id, order_id, product_id, quantity)
Write one SQLite SELECT query inside a ```sql block.
Question: What is the total quantity of items ordered by customer... |
T01 | How many customers live in Bengaluru? | SELECT COUNT(*) FROM customers WHERE city='Bengaluru' | Database schema (SQLite):
customers(id, name, city, segment, signup_date)
products(id, name, category, price)
orders(id, customer_id, order_date, status)
order_items(id, order_id, product_id, quantity)
Write one SQLite SELECT query inside a ```sql block.
Question: How many customers live in Bengaluru? |
T19 | How many orders did the customer 'Karthik Rao' place? | SELECT COUNT(*) FROM orders o JOIN customers c ON c.id=o.customer_id WHERE c.name='Karthik Rao' | Database schema (SQLite):
customers(id, name, city, segment, signup_date)
products(id, name, category, price)
orders(id, customer_id, order_date, status)
order_items(id, order_id, product_id, quantity)
Write one SQLite SELECT query inside a ```sql block.
Question: How many orders did the customer 'Karthik Rao' place? |
T19 | How many orders did the customer 'Vikram Singh' place? | SELECT COUNT(*) FROM orders o JOIN customers c ON c.id=o.customer_id WHERE c.name='Vikram Singh' | Database schema (SQLite):
customers(id, name, city, segment, signup_date)
products(id, name, category, price)
orders(id, customer_id, order_date, status)
order_items(id, order_id, product_id, quantity)
Write one SQLite SELECT query inside a ```sql block.
Question: How many orders did the customer 'Vikram Singh' place? |
T07 | What is the total quantity sold of the product 'Oil Lite'? | SELECT SUM(oi.quantity) FROM order_items oi JOIN products p ON p.id=oi.product_id WHERE p.name='Oil Lite' | Database schema (SQLite):
customers(id, name, city, segment, signup_date)
products(id, name, category, price)
orders(id, customer_id, order_date, status)
order_items(id, order_id, product_id, quantity)
Write one SQLite SELECT query inside a ```sql block.
Question: What is the total quantity sold of the product 'Oil Lit... |
T19 | How many orders did the customer 'Manoj Iyer' place? | SELECT COUNT(*) FROM orders o JOIN customers c ON c.id=o.customer_id WHERE c.name='Manoj Iyer' | Database schema (SQLite):
customers(id, name, city, segment, signup_date)
products(id, name, category, price)
orders(id, customer_id, order_date, status)
order_items(id, order_id, product_id, quantity)
Write one SQLite SELECT query inside a ```sql block.
Question: How many orders did the customer 'Manoj Iyer' place? |
T09 | Which customers in Hyderabad have placed at least one order? List their names. | SELECT DISTINCT c.name FROM customers c JOIN orders o ON o.customer_id=c.id WHERE c.city='Hyderabad' | Database schema (SQLite):
customers(id, name, city, segment, signup_date)
products(id, name, category, price)
orders(id, customer_id, order_date, status)
order_items(id, order_id, product_id, quantity)
Write one SQLite SELECT query inside a ```sql block.
Question: Which customers in Hyderabad have placed at least one o... |
T07 | What is the total quantity sold of the product 'Cabinet Pro'? | SELECT SUM(oi.quantity) FROM order_items oi JOIN products p ON p.id=oi.product_id WHERE p.name='Cabinet Pro' | Database schema (SQLite):
customers(id, name, city, segment, signup_date)
products(id, name, category, price)
orders(id, customer_id, order_date, status)
order_items(id, order_id, product_id, quantity)
Write one SQLite SELECT query inside a ```sql block.
Question: What is the total quantity sold of the product 'Cabinet... |
T19 | How many orders did the customer 'Nisha Singh' place? | SELECT COUNT(*) FROM orders o JOIN customers c ON c.id=o.customer_id WHERE c.name='Nisha Singh' | Database schema (SQLite):
customers(id, name, city, segment, signup_date)
products(id, name, category, price)
orders(id, customer_id, order_date, status)
order_items(id, order_id, product_id, quantity)
Write one SQLite SELECT query inside a ```sql block.
Question: How many orders did the customer 'Nisha Singh' place? |
T21 | List customers in Mumbai who are in the Retail segment. | SELECT name FROM customers WHERE city='Mumbai' AND segment='Retail' | Database schema (SQLite):
customers(id, name, city, segment, signup_date)
products(id, name, category, price)
orders(id, customer_id, order_date, status)
order_items(id, order_id, product_id, quantity)
Write one SQLite SELECT query inside a ```sql block.
Question: List customers in Mumbai who are in the Retail segment. |
T05 | List products in the Sports category priced above 2500. | SELECT name FROM products WHERE category='Sports' AND price>2500 | Database schema (SQLite):
customers(id, name, city, segment, signup_date)
products(id, name, category, price)
orders(id, customer_id, order_date, status)
order_items(id, order_id, product_id, quantity)
Write one SQLite SELECT query inside a ```sql block.
Question: List products in the Sports category priced above 2500. |
T21 | List customers in Delhi who are in the Startup segment. | SELECT name FROM customers WHERE city='Delhi' AND segment='Startup' | Database schema (SQLite):
customers(id, name, city, segment, signup_date)
products(id, name, category, price)
orders(id, customer_id, order_date, status)
order_items(id, order_id, product_id, quantity)
Write one SQLite SELECT query inside a ```sql block.
Question: List customers in Delhi who are in the Startup segment. |
T21 | List customers in Chennai who are in the Startup segment. | SELECT name FROM customers WHERE city='Chennai' AND segment='Startup' | Database schema (SQLite):
customers(id, name, city, segment, signup_date)
products(id, name, category, price)
orders(id, customer_id, order_date, status)
order_items(id, order_id, product_id, quantity)
Write one SQLite SELECT query inside a ```sql block.
Question: List customers in Chennai who are in the Startup segmen... |
T19 | How many orders did the customer 'Sanjay Reddy' place? | SELECT COUNT(*) FROM orders o JOIN customers c ON c.id=o.customer_id WHERE c.name='Sanjay Reddy' | Database schema (SQLite):
customers(id, name, city, segment, signup_date)
products(id, name, category, price)
orders(id, customer_id, order_date, status)
order_items(id, order_id, product_id, quantity)
Write one SQLite SELECT query inside a ```sql block.
Question: How many orders did the customer 'Sanjay Reddy' place? |
T19 | How many orders did the customer 'Kavya Das' place? | SELECT COUNT(*) FROM orders o JOIN customers c ON c.id=o.customer_id WHERE c.name='Kavya Das' | Database schema (SQLite):
customers(id, name, city, segment, signup_date)
products(id, name, category, price)
orders(id, customer_id, order_date, status)
order_items(id, order_id, product_id, quantity)
Write one SQLite SELECT query inside a ```sql block.
Question: How many orders did the customer 'Kavya Das' place? |
T14 | List the cities that have more than 5 customers. | SELECT city FROM customers GROUP BY city HAVING COUNT(*)>5 | Database schema (SQLite):
customers(id, name, city, segment, signup_date)
products(id, name, category, price)
orders(id, customer_id, order_date, status)
order_items(id, order_id, product_id, quantity)
Write one SQLite SELECT query inside a ```sql block.
Question: List the cities that have more than 5 customers. |
T19 | How many orders did the customer 'Rekha Menon' place? | SELECT COUNT(*) FROM orders o JOIN customers c ON c.id=o.customer_id WHERE c.name='Rekha Menon' | Database schema (SQLite):
customers(id, name, city, segment, signup_date)
products(id, name, category, price)
orders(id, customer_id, order_date, status)
order_items(id, order_id, product_id, quantity)
Write one SQLite SELECT query inside a ```sql block.
Question: How many orders did the customer 'Rekha Menon' place? |
T07 | What is the total quantity sold of the product 'Helmet Pro'? | SELECT SUM(oi.quantity) FROM order_items oi JOIN products p ON p.id=oi.product_id WHERE p.name='Helmet Pro' | Database schema (SQLite):
customers(id, name, city, segment, signup_date)
products(id, name, category, price)
orders(id, customer_id, order_date, status)
order_items(id, order_id, product_id, quantity)
Write one SQLite SELECT query inside a ```sql block.
Question: What is the total quantity sold of the product 'Helmet ... |
T02 | List the names of customers in the Startup segment. | SELECT name FROM customers WHERE segment='Startup' | Database schema (SQLite):
customers(id, name, city, segment, signup_date)
products(id, name, category, price)
orders(id, customer_id, order_date, status)
order_items(id, order_id, product_id, quantity)
Write one SQLite SELECT query inside a ```sql block.
Question: List the names of customers in the Startup segment. |
T23 | How many orders with status 'Cancelled' were placed in 2024? | SELECT COUNT(*) FROM orders WHERE status='Cancelled' AND strftime('%Y', order_date)='2024' | Database schema (SQLite):
customers(id, name, city, segment, signup_date)
products(id, name, category, price)
orders(id, customer_id, order_date, status)
order_items(id, order_id, product_id, quantity)
Write one SQLite SELECT query inside a ```sql block.
Question: How many orders with status 'Cancelled' were placed in ... |
T19 | How many orders did the customer 'Karthik Nair' place? | SELECT COUNT(*) FROM orders o JOIN customers c ON c.id=o.customer_id WHERE c.name='Karthik Nair' | Database schema (SQLite):
customers(id, name, city, segment, signup_date)
products(id, name, category, price)
orders(id, customer_id, order_date, status)
order_items(id, order_id, product_id, quantity)
Write one SQLite SELECT query inside a ```sql block.
Question: How many orders did the customer 'Karthik Nair' place? |
T23 | How many orders with status 'Cancelled' were placed in 2023? | SELECT COUNT(*) FROM orders WHERE status='Cancelled' AND strftime('%Y', order_date)='2023' | Database schema (SQLite):
customers(id, name, city, segment, signup_date)
products(id, name, category, price)
orders(id, customer_id, order_date, status)
order_items(id, order_id, product_id, quantity)
Write one SQLite SELECT query inside a ```sql block.
Question: How many orders with status 'Cancelled' were placed in ... |
T23 | How many orders with status 'Delivered' were placed in 2024? | SELECT COUNT(*) FROM orders WHERE status='Delivered' AND strftime('%Y', order_date)='2024' | Database schema (SQLite):
customers(id, name, city, segment, signup_date)
products(id, name, category, price)
orders(id, customer_id, order_date, status)
order_items(id, order_id, product_id, quantity)
Write one SQLite SELECT query inside a ```sql block.
Question: How many orders with status 'Delivered' were placed in ... |
T19 | How many orders did the customer 'Sanjay Nair' place? | SELECT COUNT(*) FROM orders o JOIN customers c ON c.id=o.customer_id WHERE c.name='Sanjay Nair' | Database schema (SQLite):
customers(id, name, city, segment, signup_date)
products(id, name, category, price)
orders(id, customer_id, order_date, status)
order_items(id, order_id, product_id, quantity)
Write one SQLite SELECT query inside a ```sql block.
Question: How many orders did the customer 'Sanjay Nair' place? |
T10 | How many orders were placed in 2023? | SELECT COUNT(*) FROM orders WHERE strftime('%Y', order_date)='2023' | Database schema (SQLite):
customers(id, name, city, segment, signup_date)
products(id, name, category, price)
orders(id, customer_id, order_date, status)
order_items(id, order_id, product_id, quantity)
Write one SQLite SELECT query inside a ```sql block.
Question: How many orders were placed in 2023? |
YAML Metadata Warning:empty or missing yaml metadata in repo card
Check out the documentation for more information.
Synthetic business SQLite database (business.db) with 218 template-generated question/gold-SQL pairs:
train (150), test_iid (51), test_novel (17, four query shapes never seen in training).
Leak check: exact question/SQL match and template overlap, all zero (leak_report.json). English only.