sql-repair-env / data /easy.json
ashoka0402
clean commit (removed token)
64ccc23
Raw History Blame
6.28 kB
[
{
"id": "easy_001",
"difficulty": "easy",
"schema": { "tables": ["users(id, name, email, age, city, active)"] },
"intent": "Find all users older than 30",
"broken_query": "SELECT * FROM user WHERE age >> 30",
"correct_query": "SELECT * FROM users WHERE age > 30",
"error_type": "syntax",
"min_turns_expected": 1,
"clarification_answers": {
"table name": "users",
"age column": "INTEGER"
}
},
{
"id": "easy_002",
"difficulty": "easy",
"schema": { "tables": ["users(id, name, email, age, city, active)"] },
"intent": "Get the names and emails of all active users",
"broken_query": "SELECT name email FROM users WHERE active = 1",
"correct_query": "SELECT name, email FROM users WHERE active = 1",
"error_type": "syntax",
"min_turns_expected": 1,
"clarification_answers": {
"active column": "INTEGER, 1 means active"
}
},
{
"id": "easy_003",
"difficulty": "easy",
"schema": { "tables": ["users(id, name, email, age, city, active)"] },
"intent": "Count total number of users",
"broken_query": "SELECT COUNTS(*) FROM users",
"correct_query": "SELECT COUNT(*) FROM users",
"error_type": "syntax",
"min_turns_expected": 1,
"clarification_answers": {}
},
{
"id": "easy_004",
"difficulty": "easy",
"schema": { "tables": ["users(id, name, email, age, city, active)"] },
"intent": "Find users who live in Mumbai",
"broken_query": "SELECT * FROM users WHERE city = Mumbai",
"correct_query": "SELECT * FROM users WHERE city = 'Mumbai'",
"error_type": "syntax",
"min_turns_expected": 1,
"clarification_answers": {
"city column type": "TEXT"
}
},
{
"id": "easy_005",
"difficulty": "easy",
"schema": { "tables": ["users(id, name, email, age, city, active)"] },
"intent": "Get distinct cities from the users table",
"broken_query": "SELECT DISTINCT(city) city FROM users",
"correct_query": "SELECT DISTINCT city FROM users",
"error_type": "syntax",
"min_turns_expected": 1,
"clarification_answers": {}
},
{
"id": "easy_006",
"difficulty": "easy",
"schema": { "tables": ["users(id, name, email, age, city, active)"] },
"intent": "Get users sorted by age from youngest to oldest",
"broken_query": "SELECT * FROM users ORDER age ASC",
"correct_query": "SELECT * FROM users ORDER BY age ASC",
"error_type": "syntax",
"min_turns_expected": 1,
"clarification_answers": {}
},
{
"id": "easy_007",
"difficulty": "easy",
"schema": { "tables": ["users(id, name, email, age, city, active)"] },
"intent": "Find users whose name starts with the letter A",
"broken_query": "SELECT * FROM users WHERE name LIKE 'A'",
"correct_query": "SELECT * FROM users WHERE name LIKE 'A%'",
"error_type": "logic",
"min_turns_expected": 1,
"clarification_answers": {
"name column type": "TEXT"
}
},
{
"id": "easy_008",
"difficulty": "easy",
"schema": { "tables": ["users(id, name, email, age, city, active)"] },
"intent": "Find the oldest user",
"broken_query": "SELECT * FROM users WHERE age = MAX(age)",
"correct_query": "SELECT * FROM users ORDER BY age DESC LIMIT 1",
"error_type": "logic",
"min_turns_expected": 1,
"clarification_answers": {}
},
{
"id": "easy_009",
"difficulty": "easy",
"schema": { "tables": ["users(id, name, email, age, city, active)"] },
"intent": "Get users aged between 25 and 35 inclusive",
"broken_query": "SELECT * FROM users WHERE age > 25 AND age < 35",
"correct_query": "SELECT * FROM users WHERE age >= 25 AND age <= 35",
"error_type": "logic",
"min_turns_expected": 1,
"clarification_answers": {
"is the range inclusive": "yes, both 25 and 35 are included"
}
},
{
"id": "easy_010",
"difficulty": "easy",
"schema": { "tables": ["users(id, name, email, age, city, active)"] },
"intent": "Find inactive users (active = 0)",
"broken_query": "SELECT * FROM users WHERE active != 1",
"correct_query": "SELECT * FROM users WHERE active = 0",
"error_type": "logic",
"min_turns_expected": 1,
"clarification_answers": {
"active values": "0 for inactive, 1 for active"
}
},
{
"id": "easy_011",
"difficulty": "easy",
"schema": { "tables": ["users(id, name, email, age, city, active)"] },
"intent": "Get user with id = 5",
"broken_query": "SELECT * FROM users WHERE id == 5",
"correct_query": "SELECT * FROM users WHERE id = 5",
"error_type": "syntax",
"min_turns_expected": 1,
"clarification_answers": {}
},
{
"id": "easy_012",
"difficulty": "easy",
"schema": { "tables": ["users(id, name, email, age, city, active)"] },
"intent": "Get the average age of all users",
"broken_query": "SELECT AVERAGE(age) FROM users",
"correct_query": "SELECT AVG(age) FROM users",
"error_type": "syntax",
"min_turns_expected": 1,
"clarification_answers": {}
},
{
"id": "easy_013",
"difficulty": "easy",
"schema": { "tables": ["users(id, name, email, age, city, active)"] },
"intent": "Get the top 3 youngest users",
"broken_query": "SELECT * FROM users ORDER BY age ASC LIMIT(3)",
"correct_query": "SELECT * FROM users ORDER BY age ASC LIMIT 3",
"error_type": "syntax",
"min_turns_expected": 1,
"clarification_answers": {}
},
{
"id": "easy_014",
"difficulty": "easy",
"schema": { "tables": ["users(id, name, email, age, city, active)"] },
"intent": "Find users who are NOT from Tokyo",
"broken_query": "SELECT * FROM users WHERE NOT city Tokyo",
"correct_query": "SELECT * FROM users WHERE city != 'Tokyo'",
"error_type": "syntax",
"min_turns_expected": 1,
"clarification_answers": {}
},
{
"id": "easy_015",
"difficulty": "easy",
"schema": { "tables": ["users(id, name, email, age, city, active)"] },
"intent": "Count users grouped by city",
"broken_query": "SELECT city, COUNT(*) FROM users GROUP city",
"correct_query": "SELECT city, COUNT(*) FROM users GROUP BY city",
"error_type": "syntax",
"min_turns_expected": 1,
"clarification_answers": {}
}
]