Dataset Viewer
Auto-converted to Parquet Duplicate
question
stringclasses
10 values
sql
stringclasses
10 values
schema
stringclasses
1 value
What are the unique car makes in the database?
SELECT DISTINCT make FROM cars;
cars (id INT, make VARCHAR(255), model VARCHAR(255), year INT, color VARCHAR(255))
Which cars are made between the years 2010 and 2020?
SELECT * FROM cars WHERE year BETWEEN 2010 AND 2020;
cars (id INT, make VARCHAR(255), model VARCHAR(255), year INT, color VARCHAR(255))
How many cars are made by each manufacturer?
SELECT make, COUNT() FROM cars GROUP BY make;
cars (id INT, make VARCHAR(255), model VARCHAR(255), year INT, color VARCHAR(255))
Which cars have a year greater than 2015 and are blue?
SELECT * FROM cars WHERE year > 2015 AND color = 'blue';
cars (id INT, make VARCHAR(255), model VARCHAR(255), year INT, color VARCHAR(255))
How many cars were made in each year?
SELECT year, COUNT() FROM cars GROUP BY year;
cars (id INT, make VARCHAR(255), model VARCHAR(255), year INT, color VARCHAR(255))
What is the total number of cars made by 'Honda'?
SELECT COUNT() FROM cars WHERE make = 'Honda';
cars (id INT, make VARCHAR(255), model VARCHAR(255), year INT, color VARCHAR(255))
Which red cars have the word 'sedan' in their model name?
SELECT * FROM cars WHERE color = 'red' AND model LIKE '%sedan%';
cars (id INT, make VARCHAR(255), model VARCHAR(255), year INT, color VARCHAR(255))
What is the least common car color in the database?
SELECT color, COUNT() FROM cars GROUP BY color ORDER BY COUNT(*) ASC LIMIT 1;
cars (id INT, make VARCHAR(255), model VARCHAR(255), year INT, color VARCHAR(255))
What is the ID of the car with the make 'Ford' and model 'Mustang'?
SELECT id FROM cars WHERE make='Ford' AND model='Mustang';
cars (id INT, make VARCHAR(255), model VARCHAR(255), year INT, color VARCHAR(255))
Which cars have the make 'BMW' and are either black or white?
SELECT * FROM cars WHERE make='BMW' AND (color='black' OR color='white');
cars (id INT, make VARCHAR(255), model VARCHAR(255), year INT, color VARCHAR(255))

Dataset Card for "question_to_sql_with_ddl_test"

More Information needed

Downloads last month
11