Dataset Viewer
Auto-converted to Parquet Duplicate
question
stringclasses
10 values
sql
stringclasses
10 values
schema
stringclasses
1 value
How many cars are in the database?
SELECT COUNT(*) FROM cars;
cars (id INT, make VARCHAR(255), model VARCHAR(255), year INT, color VARCHAR(255))
What is the average year of the cars in the database?
SELECT AVG(year) FROM cars;
cars (id INT, make VARCHAR(255), model VARCHAR(255), year INT, color VARCHAR(255))
What are the different colors available for the cars?
SELECT DISTINCT color FROM cars;
cars (id INT, make VARCHAR(255), model VARCHAR(255), year INT, color VARCHAR(255))
What is the oldest car in the database?
SELECT * FROM cars ORDER BY year ASC LIMIT 1;
cars (id INT, make VARCHAR(255), model VARCHAR(255), year INT, color VARCHAR(255))
What is the newest car in the database?
SELECT * FROM cars ORDER BY year DESC LIMIT 1;
cars (id INT, make VARCHAR(255), model VARCHAR(255), year INT, color VARCHAR(255))
How many cars of each color are in the database?
SELECT color, COUNT(*) FROM cars GROUP BY color;
cars (id INT, make VARCHAR(255), model VARCHAR(255), year INT, color VARCHAR(255))
Which cars were made in the year 2021?
SELECT * FROM cars WHERE year=2021;
cars (id INT, make VARCHAR(255), model VARCHAR(255), year INT, color VARCHAR(255))
Which cars have the word 'sport' in their model name?
SELECT * FROM cars WHERE model LIKE '%sport%';
cars (id INT, make VARCHAR(255), model VARCHAR(255), year INT, color VARCHAR(255))
What is the most common make of car in the database?
SELECT make, COUNT(*) FROM cars GROUP BY make ORDER BY COUNT(*) DESC 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 'Toyota' and model 'Camry'?
SELECT id FROM cars WHERE make='Toyota' AND model='Camry';
cars (id INT, make VARCHAR(255), model VARCHAR(255), year INT, color VARCHAR(255))

Dataset Card for "question_to_sql_with_ddl_small"

More Information needed

Downloads last month
11