[ { "id": "easy_001", "category": "syntax", "description": "Fix the SQL syntax error: missing comma in SELECT clause.", "buggy_query": "SELECT id name email FROM users WHERE active = 1", "fixed_query": "SELECT id, name, email FROM users WHERE active = 1", "error_message": "ERROR: syntax error at or near 'name'", "database_schema": { "users": ["id INT PRIMARY KEY", "name VARCHAR(100)", "email VARCHAR(100)", "active INT"] }, "expected_output": [ {"id": 1, "name": "Alice", "email": "alice@example.com"}, {"id": 2, "name": "Bob", "email": "bob@example.com"} ], "error_type": "syntax", "error_location": "SELECT clause", "fix_description": "Add missing commas between column names in SELECT clause", "estimated_fix_steps": 2, "partial_credit_hints": { "identifies_location": 0.2, "identifies_error_type": 0.2, "correct_fix": 0.5, "explanation": 0.1 } }, { "id": "easy_002", "category": "syntax", "description": "Fix the SQL syntax error: missing WHERE keyword.", "buggy_query": "SELECT * FROM orders id = 101", "fixed_query": "SELECT * FROM orders WHERE id = 101", "error_message": "ERROR: syntax error at or near 'id'", "database_schema": { "orders": ["id INT PRIMARY KEY", "user_id INT", "total DECIMAL", "status VARCHAR(20)"] }, "expected_output": [ {"id": 101, "user_id": 5, "total": 250.00, "status": "shipped"} ], "error_type": "syntax", "error_location": "FROM clause", "fix_description": "Add missing WHERE keyword before the filter condition", "estimated_fix_steps": 2, "partial_credit_hints": { "identifies_location": 0.2, "identifies_error_type": 0.2, "correct_fix": 0.5, "explanation": 0.1 } }, { "id": "easy_003", "category": "syntax", "description": "Fix the SQL syntax error: unclosed string literal.", "buggy_query": "SELECT * FROM products WHERE category = 'electronics", "fixed_query": "SELECT * FROM products WHERE category = 'electronics'", "error_message": "ERROR: unterminated quoted string at or near \"'electronics\"", "database_schema": { "products": ["id INT PRIMARY KEY", "name VARCHAR(100)", "category VARCHAR(50)", "price DECIMAL"] }, "expected_output": [ {"id": 3, "name": "Laptop", "category": "electronics", "price": 999.99} ], "error_type": "syntax", "error_location": "WHERE clause string literal", "fix_description": "Close the single quote at the end of 'electronics'", "estimated_fix_steps": 1, "partial_credit_hints": { "identifies_location": 0.2, "identifies_error_type": 0.2, "correct_fix": 0.5, "explanation": 0.1 } }, { "id": "easy_004", "category": "syntax", "description": "Fix the SQL syntax error: wrong keyword ORDER used instead of ORDER BY.", "buggy_query": "SELECT id, name, price FROM products ORDER price DESC", "fixed_query": "SELECT id, name, price FROM products ORDER BY price DESC", "error_message": "ERROR: syntax error at or near 'price'", "database_schema": { "products": ["id INT PRIMARY KEY", "name VARCHAR(100)", "category VARCHAR(50)", "price DECIMAL"] }, "expected_output": [ {"id": 7, "name": "TV", "price": 1200.00}, {"id": 3, "name": "Laptop", "price": 999.99} ], "error_type": "syntax", "error_location": "ORDER clause", "fix_description": "Replace ORDER with ORDER BY", "estimated_fix_steps": 1, "partial_credit_hints": { "identifies_location": 0.2, "identifies_error_type": 0.2, "correct_fix": 0.5, "explanation": 0.1 } }, { "id": "easy_005", "category": "syntax", "description": "Fix the SQL syntax error: GROUP used instead of GROUP BY.", "buggy_query": "SELECT department, COUNT(*) FROM employees GROUP department", "fixed_query": "SELECT department, COUNT(*) FROM employees GROUP BY department", "error_message": "ERROR: syntax error at or near 'department'", "database_schema": { "employees": ["id INT PRIMARY KEY", "name VARCHAR(100)", "department VARCHAR(50)", "salary DECIMAL"] }, "expected_output": [ {"department": "Engineering", "count": 12}, {"department": "Marketing", "count": 8} ], "error_type": "syntax", "error_location": "GROUP clause", "fix_description": "Replace GROUP with GROUP BY", "estimated_fix_steps": 1, "partial_credit_hints": { "identifies_location": 0.2, "identifies_error_type": 0.2, "correct_fix": 0.5, "explanation": 0.1 } } ]