HideIron commited on
Commit
e0aafdf
·
verified ·
1 Parent(s): 17ca51a

student run gate

Browse files
runs/healed2-gate/results.jsonl ADDED
@@ -0,0 +1,100 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {"qid": "gate_0000", "split": "gate", "db_id": "hr_1", "question": "Find the first name and last name and department id for those employees who earn such amount of salary which is the smallest salary of any of the departments.", "gold_sql": "SELECT first_name , last_name , department_id FROM employees WHERE salary IN (SELECT MIN(salary) FROM employees GROUP BY department_id)", "raw_output": "SELECT e.FIRST_NAME, e.LAST_NAME, d.DEPARTMENT_ID\nFROM employees e\nJOIN departments d ON e.DEPARTMENT_ID = d.DEPARTMENT_ID\nWHERE e.SALARY = (\n SELECT MIN(SALARY)\n FROM employees\n WHERE SALARY > 0\n);\n```", "status": "wrong_result", "error_message": "", "pred_rows": 1, "gold_rows": 26, "prompt_tokens": 1164, "new_tokens": 72}
2
+ {"qid": "gate_0001", "split": "gate", "db_id": "culture_company", "question": "Show publishers with a book published in 1989 and a book in 1990.", "gold_sql": "SELECT publisher FROM book_club WHERE YEAR = 1989 INTERSECT SELECT publisher FROM book_club WHERE YEAR = 1990", "raw_output": "SELECT DISTINCT p.Publisher\nFROM book_club bc\nJOIN movie m ON bc.\"Year\" = m.\"Year\"\nWHERE bc.\"Year\" IN (1989, 1990)\nAND p.Publisher IS NOT NULL;", "status": "sql_error", "error_message": "no such column: p.Publisher", "pred_rows": null, "gold_rows": 2, "prompt_tokens": 628, "new_tokens": 50}
3
+ {"qid": "gate_0002", "split": "gate", "db_id": "insurance_fnol", "question": "Find the phone numbers of customers using the most common policy type among the available policies.", "gold_sql": "SELECT customer_phone FROM available_policies WHERE policy_type_code = (SELECT policy_type_code FROM available_policies GROUP BY policy_type_code ORDER BY count(*) DESC LIMIT 1)", "raw_output": "SELECT c.Customer_Phone\nFROM Customers c\nJOIN Customers_Policies cp ON c.Customer_ID = cp.Customer_ID\nJOIN Available_Policies a ON cp.Policy_ID = a.Policy_ID\nGROUP BY c.Customer_Phone\nORDER BY COUNT(DISTINCT a.policy_type_code) DESC\nLIMIT 1;", "status": "sql_error", "error_message": "no such column: c.Customer_Phone", "pred_rows": null, "gold_rows": 5, "prompt_tokens": 802, "new_tokens": 77}
4
+ {"qid": "gate_0003", "split": "gate", "db_id": "student_1", "question": "Count the number of students the teacher LORIA ONDERSMA teaches.", "gold_sql": "SELECT count(*) FROM list AS T1 JOIN teachers AS T2 ON T1.classroom = T2.classroom WHERE T2.firstname = \"LORIA\" AND T2.lastname = \"ONDERSMA\"", "raw_output": "SELECT COUNT(*)\nFROM list\nWHERE FirstName = 'LORIA' AND LastName = 'ONDERSMA';", "status": "correct", "error_message": "", "pred_rows": 1, "gold_rows": 1, "prompt_tokens": 517, "new_tokens": 27}
5
+ {"qid": "gate_0004", "split": "gate", "db_id": "cre_Doc_Control_Systems", "question": "What address was the document with id 4 mailed to?", "gold_sql": "SELECT Addresses.address_details FROM Addresses JOIN Documents_Mailed ON Documents_Mailed.mailed_to_address_id = Addresses.address_id WHERE document_id = 4;", "raw_output": "SELECT a.address_details\nFROM Addresses a\nJOIN Documents_Mailed dm ON a.address_id = dm.mailed_to_address_id\nWHERE dm.document_id = 4;", "status": "correct", "error_message": "", "pred_rows": 2, "gold_rows": 2, "prompt_tokens": 1081, "new_tokens": 38}
6
+ {"qid": "gate_0005", "split": "gate", "db_id": "game_1", "question": "How many different types of sports do we offer?", "gold_sql": "SELECT count(DISTINCT sportname) FROM Sportsinfo", "raw_output": "SELECT COUNT(DISTINCT GType) AS NumberOfSports\nFROM Video_Games;", "status": "wrong_result", "error_message": "", "pred_rows": 1, "gold_rows": 1, "prompt_tokens": 628, "new_tokens": 20}
7
+ {"qid": "gate_0006", "split": "gate", "db_id": "insurance_fnol", "question": "Which customer uses the most policies? Give me the customer name.", "gold_sql": "SELECT t1.customer_name FROM customers AS t1 JOIN customers_policies AS t2 ON t1.customer_id = t2.customer_id GROUP BY t1.customer_name ORDER BY count(*) DESC LIMIT 1", "raw_output": "SELECT c.Customer_name\nFROM Customers c\nJOIN Customers_Policies cp ON c.Customer_ID = cp.Customer_ID\nGROUP BY c.Customer_ID, c.Customer_name\nORDER BY COUNT(DISTINCT cp.Policy_ID) DESC\nLIMIT 1;", "status": "correct", "error_message": "", "pred_rows": 1, "gold_rows": 1, "prompt_tokens": 798, "new_tokens": 59}
8
+ {"qid": "gate_0007", "split": "gate", "db_id": "twitter_1", "question": "What is the partition id of the user named \"Iron Man\".", "gold_sql": "SELECT partitionid FROM user_profiles WHERE name = 'Iron Man'", "raw_output": "SELECT `partitionid`\nFROM `user_profiles`\nWHERE `name` = 'Iron Man';", "status": "correct", "error_message": "", "pred_rows": 1, "gold_rows": 1, "prompt_tokens": 635, "new_tokens": 22}
9
+ {"qid": "gate_0008", "split": "gate", "db_id": "school_bus", "question": "Show the school name and type for schools without a school bus.", "gold_sql": "SELECT school , TYPE FROM school WHERE school_id NOT IN (SELECT school_id FROM school_bus)", "raw_output": "SELECT s.School, s.Type\nFROM school s\nWHERE NOT EXISTS (\n SELECT 1\n FROM school_bus sb\n WHERE sb.School_ID = s.School_ID\n);", "status": "correct", "error_message": "", "pred_rows": 2, "gold_rows": 2, "prompt_tokens": 576, "new_tokens": 43}
10
+ {"qid": "gate_0009", "split": "gate", "db_id": "race_track", "question": "What are the names, classes, and dates for all races?", "gold_sql": "SELECT name , CLASS , date FROM race", "raw_output": "SELECT Name, Class, Date\nFROM race;", "status": "correct", "error_message": "", "pred_rows": 7, "gold_rows": 7, "prompt_tokens": 518, "new_tokens": 12}
11
+ {"qid": "gate_0010", "split": "gate", "db_id": "club_1", "question": "Tell me the location of the club \"Hopkins Student Enterprises\".", "gold_sql": "SELECT clublocation FROM club WHERE clubname = \"Hopkins Student Enterprises\"", "raw_output": "SELECT ClubLocation\nFROM Club\nWHERE ClubName = 'Hopkins Student Enterprises';", "status": "correct", "error_message": "", "pred_rows": 1, "gold_rows": 1, "prompt_tokens": 578, "new_tokens": 19}
12
+ {"qid": "gate_0011", "split": "gate", "db_id": "party_people", "question": "Return the minister who left office at the latest time.", "gold_sql": "SELECT minister FROM party ORDER BY left_office DESC LIMIT 1", "raw_output": "SELECT p.Minister\nFROM party p\nJOIN party_events pe ON p.Party_ID = pe.Party_ID\nJOIN region r ON p.Region_ID = r.Region_ID\nWHERE p.Left_office = (SELECT MAX(Left_office) FROM party)\nORDER BY p.Left_office DESC;", "status": "wrong_result", "error_message": "", "pred_rows": 0, "gold_rows": 1, "prompt_tokens": 664, "new_tokens": 67}
13
+ {"qid": "gate_0012", "split": "gate", "db_id": "candidate_poll", "question": "Find the name of the candidates whose oppose percentage is the lowest for each sex.", "gold_sql": "SELECT t1.name , t1.sex , min(oppose_rate) FROM people AS t1 JOIN candidate AS t2 ON t1.people_id = t2.people_id GROUP BY t1.sex", "raw_output": "SELECT p.Name, c.Opose_rate\nFROM candidate c\nJOIN people p ON c.People_ID = p.People_ID\nGROUP BY p.Sex, c.Opose_rate\nORDER BY p.Sex, c.Opose_rate ASC;", "status": "sql_error", "error_message": "no such column: c.Opose_rate", "pred_rows": null, "gold_rows": 2, "prompt_tokens": 547, "new_tokens": 55}
14
+ {"qid": "gate_0013", "split": "gate", "db_id": "manufactory_1", "question": "How many products are there for each manufacturer?", "gold_sql": "SELECT count(*) , T2.name FROM products AS T1 JOIN manufacturers AS T2 ON T1.Manufacturer = T2.code GROUP BY T2.name", "raw_output": "SELECT M.Name, COUNT(P.Code) AS ProductCount\nFROM Manufacturers M\nJOIN Products P ON M.Code = P.Manufacturer\nGROUP BY M.Name;", "status": "wrong_result", "error_message": "", "pred_rows": 6, "gold_rows": 6, "prompt_tokens": 516, "new_tokens": 38}
15
+ {"qid": "gate_0014", "split": "gate", "db_id": "race_track", "question": "Give the names of tracks that do not have a race in the class 'GT'.", "gold_sql": "SELECT name FROM track EXCEPT SELECT T2.name FROM race AS T1 JOIN track AS T2 ON T1.track_id = T2.track_id WHERE T1.class = 'GT'", "raw_output": "SELECT DISTINCT t.Name\nFROM track t\nWHERE t.Track_ID NOT IN (\n SELECT track.Track_ID\n FROM race r\n WHERE r.Class = 'GT'\n);\n", "status": "sql_error", "error_message": "no such column: track.Track_ID", "pred_rows": null, "gold_rows": 7, "prompt_tokens": 522, "new_tokens": 40}
16
+ {"qid": "gate_0015", "split": "gate", "db_id": "game_1", "question": "What are the average, minimum, and max ages for each of the different majors?", "gold_sql": "SELECT major , avg(age) , min(age) , max(age) FROM Student GROUP BY major", "raw_output": "SELECT Major, AVG(Age) AS AverageAge, MIN(Age) AS MinAge, MAX(Age) AS MaxAge\nFROM Student\nGROUP BY Major;", "status": "correct", "error_message": "", "pred_rows": 6, "gold_rows": 6, "prompt_tokens": 635, "new_tokens": 36}
17
+ {"qid": "gate_0016", "split": "gate", "db_id": "soccer_1", "question": "Of all players with an overall rating greater than 80, how many are right-footed and left-footed?", "gold_sql": "SELECT preferred_foot , count(*) FROM Player_Attributes WHERE overall_rating > 80 GROUP BY preferred_foot", "raw_output": "SELECT COUNT(DISTINCT\n CASE\n WHEN preferred_foot = 'Right' THEN player_api_id\n END) AS right-footed,\n COUNT(DISTINCT\n CASE\n WHEN preferred_foot = 'Left' THEN player_api_id\n END) AS left-footed\nFROM Player_Attributes\nWHERE overall_rating > 80;", "status": "sql_error", "error_message": "near \"-\": syntax error", "pred_rows": null, "gold_rows": 2, "prompt_tokens": 1528, "new_tokens": 75}
18
+ {"qid": "gate_0017", "split": "gate", "db_id": "party_people", "question": "Who are the ministers and what parties do they belong to, listed descending by the times they took office?", "gold_sql": "SELECT minister , party_name FROM party ORDER BY took_office DESC", "raw_output": "SELECT\n p.Minister,\n p.Party_name,\n p.Took_office\nFROM\n party p\nJOIN\n member m ON p.Party_ID = m.Party_ID\nORDER BY\n p.Took_office DESC;", "status": "wrong_result", "error_message": "", "pred_rows": 15, "gold_rows": 5, "prompt_tokens": 674, "new_tokens": 56}
19
+ {"qid": "gate_0018", "split": "gate", "db_id": "product_catalog", "question": "Find the entry names of the catalog with the attribute that have the most entries.", "gold_sql": "SELECT t1.catalog_entry_name FROM Catalog_Contents AS t1 JOIN Catalog_Contents_Additional_Attributes AS t2 ON t1.catalog_entry_id = t2.catalog_entry_id WHERE t2.attribute_value = (SELECT attribute_value FROM Catalog_Contents_Additional_Attributes GROUP BY attribute_value ORDER BY count(*) DESC LIMIT 1)", "raw_output": "SELECT t2.catalog_entry_name\nFROM Catalog_Contents AS t1\nJOIN Catalog_Contents_Additional_Attributes AS t3\nON t1.catalog_entry_id = t3.catalog_entry_id\nJOIN Attribute_Definitions AS t4\nON t3.attribute_id = t4.attribute_id\nGROUP BY t1.catalog_entry_name\nORDER BY COUNT(*) DESC\nLIMIT 1;", "status": "sql_error", "error_message": "no such column: t2.catalog_entry_name", "pred_rows": null, "gold_rows": 8, "prompt_tokens": 823, "new_tokens": 87}
20
+ {"qid": "gate_0019", "split": "gate", "db_id": "formula_1", "question": "What is the first and last name of all the German drivers?", "gold_sql": "SELECT forename , surname FROM drivers WHERE nationality = \"German\"", "raw_output": "SELECT\n d.forename,\n d.surname\nFROM\n drivers d\nJOIN\n drivers d2 ON d2.driverId = d.driverId\nWHERE\n d.nationality = 'Germany'\n AND d2.driverId = (\n SELECT\n driverId\n FROM\n drivers\n WHERE\n nationality = 'Germany'\n AND (\n SELECT\n MAX(positionOrder)\n FROM\n results\n WHERE\n driverId = d.driverId\n ) = (\n SELECT\n MAX(positionOrder)\n FROM\n results\n WHERE\n driverId = d2.driverId\n )\n );", "status": "wrong_result", "error_message": "", "pred_rows": 0, "gold_rows": 49, "prompt_tokens": 1495, "new_tokens": 146}
21
+ {"qid": "gate_0020", "split": "gate", "db_id": "store_product", "question": "What city is the headquarter of the store Blackville?", "gold_sql": "SELECT t3.headquartered_city FROM store AS t1 JOIN store_district AS t2 ON t1.store_id = t2.store_id JOIN district AS t3 ON t2.district_id = t3.district_id WHERE t1.store_name = \"Blackville\"", "raw_output": "SELECT \"Headquartered_City\"\nFROM district\nWHERE \"District_name\" = 'Blackville';", "status": "wrong_result", "error_message": "", "pred_rows": 0, "gold_rows": 1, "prompt_tokens": 701, "new_tokens": 23}
22
+ {"qid": "gate_0021", "split": "gate", "db_id": "medicine_enzyme_interaction", "question": "What are the ids, names and FDA approval status of medicines in descending order of the number of enzymes that it can interact with.", "gold_sql": "SELECT T1.id , T1.Name , T1.FDA_approved FROM medicine AS T1 JOIN medicine_enzyme_interaction AS T2 ON T2.medicine_id = T1.id GROUP BY T1.id ORDER BY count(*) DESC", "raw_output": "SELECT\n m.id,\n m.name,\n m.FDA_approved\nFROM\n medicine m\nJOIN\n medicine_enzyme_interaction me ON m.id = me.medicine_id\nGROUP BY\n m.id, m.name, m.FDA_approved\nORDER BY\n COUNT(DISTINCT me.enzyme_id) DESC;", "status": "wrong_result", "error_message": "", "pred_rows": 13, "gold_rows": 13, "prompt_tokens": 593, "new_tokens": 76}
23
+ {"qid": "gate_0022", "split": "gate", "db_id": "candidate_poll", "question": "Find the average and minimum weight for each gender.", "gold_sql": "SELECT avg(weight) , min(weight) , sex FROM people GROUP BY sex", "raw_output": "SELECT\n p.Sex,\n AVG(p.Weight) AS Average_Weight,\n MIN(p.Weight) AS Minimum_Weight\nFROM\n people p\nGROUP BY\n p.Sex;", "status": "wrong_result", "error_message": "", "pred_rows": 2, "gold_rows": 2, "prompt_tokens": 541, "new_tokens": 45}
24
+ {"qid": "gate_0023", "split": "gate", "db_id": "inn_1", "question": "What are the name of rooms booked by customers whose first name has \"ROY\" in part?", "gold_sql": "SELECT T2.roomName FROM Reservations AS T1 JOIN Rooms AS T2 ON T1.Room = T2.RoomId WHERE firstname LIKE '%ROY%'", "raw_output": "SELECT DISTINCT r.roomName\nFROM Reservations r\nJOIN Rooms r2 ON r.Room = r2.RoomId\nWHERE r.FirstName LIKE '%ROY%'\nAND r2.decor IS NOT NULL;", "status": "sql_error", "error_message": "no such column: r.roomName", "pred_rows": null, "gold_rows": 7, "prompt_tokens": 589, "new_tokens": 48}
25
+ {"qid": "gate_0024", "split": "gate", "db_id": "perpetrator", "question": "What is the total kills of the perpetrators with height more than 1.84.", "gold_sql": "SELECT sum(T2.Killed) FROM people AS T1 JOIN perpetrator AS T2 ON T1.People_ID = T2.People_ID WHERE T1.Height > 1.84", "raw_output": "SELECT SUM(Killed) AS TotalKills\nFROM perpetrator\nWHERE Height > 1.84;", "status": "sql_error", "error_message": "no such column: Height", "pred_rows": null, "gold_rows": 1, "prompt_tokens": 541, "new_tokens": 24}
26
+ {"qid": "gate_0025", "split": "gate", "db_id": "inn_1", "question": "Find the number of rooms for each bed type.", "gold_sql": "SELECT bedType , count(*) FROM Rooms GROUP BY bedType;", "raw_output": "SELECT bedType, COUNT(DISTINCT roomName) AS roomCount\nFROM Rooms\nGROUP BY bedType;", "status": "correct", "error_message": "", "pred_rows": 3, "gold_rows": 3, "prompt_tokens": 579, "new_tokens": 25}
27
+ {"qid": "gate_0026", "split": "gate", "db_id": "formula_1", "question": "What are the average fastest lap speed in races held after 2004 grouped by race name and ordered by year?", "gold_sql": "SELECT avg(T2.fastestlapspeed) , T1.name , T1.year FROM races AS T1 JOIN results AS T2 ON T1.raceid = T2.raceid WHERE T1.year > 2014 GROUP BY T1.name ORDER BY T1.year", "raw_output": "SELECT\n s.year,\n s.url,\n AVG(rs.fastestLapSpeed) AS avg_fastest_lap_speed\nFROM\n races r\nJOIN\n seasons s ON r.year = s.year\nJOIN\n results rs ON r.raceId = rs.raceId\nWHERE\n s.year > 2004\nGROUP BY\n s.year, s.url\nORDER BY\n s.year;", "status": "wrong_result", "error_message": "", "pred_rows": 13, "gold_rows": 22, "prompt_tokens": 1505, "new_tokens": 100}
28
+ {"qid": "gate_0027", "split": "gate", "db_id": "formula_1", "question": "Find the distinct names of all races held between 2014 and 2017?", "gold_sql": "SELECT DISTINCT name FROM races WHERE YEAR BETWEEN 2014 AND 2017", "raw_output": "SELECT DISTINCT r.name\nFROM races r\nJOIN circuits c ON r.circuitId = c.circuitId\nWHERE r.year BETWEEN 2014 AND 2017;", "status": "correct", "error_message": "", "pred_rows": 22, "gold_rows": 22, "prompt_tokens": 1499, "new_tokens": 42}
29
+ {"qid": "gate_0028", "split": "gate", "db_id": "insurance_fnol", "question": "Find the maximum and minimum settlement amount.", "gold_sql": "SELECT max(settlement_amount) , min(settlement_amount) FROM settlements", "raw_output": "SELECT MAX(Settlement_Amount) AS Max_Settlement, MIN(Settlement_Amount) AS Min_Settlement\nFROM Settlements;", "status": "correct", "error_message": "", "pred_rows": 1, "gold_rows": 1, "prompt_tokens": 793, "new_tokens": 33}
30
+ {"qid": "gate_0029", "split": "gate", "db_id": "hr_1", "question": "What are the department names, cities, and state provinces for each department?", "gold_sql": "SELECT T1.department_name , T2.city , T2.state_province FROM departments AS T1 JOIN locations AS T2 ON T2.location_id = T1.location_id", "raw_output": "SELECT\n d.DEPARTMENT_NAME,\n l.CITY,\n l.STATEProvidence\nFROM\n departments d\nJOIN\n locations l ON d.LOCATION_ID = l.LOCATION_ID;", "status": "sql_error", "error_message": "no such column: l.STATEProvidence", "pred_rows": null, "gold_rows": 27, "prompt_tokens": 1149, "new_tokens": 49}
31
+ {"qid": "gate_0030", "split": "gate", "db_id": "product_catalog", "question": "Name all the products with next entry ID greater than 8.", "gold_sql": "SELECT catalog_entry_name FROM catalog_contents WHERE next_entry_id > 8", "raw_output": "SELECT DISTINCT c.catalog_entry_name\nFROM Catalog_Contents c\nWHERE c.next_entry_id > 8;", "status": "correct", "error_message": "", "pred_rows": 3, "gold_rows": 3, "prompt_tokens": 820, "new_tokens": 25}
32
+ {"qid": "gate_0031", "split": "gate", "db_id": "inn_1", "question": "How many king beds are there?", "gold_sql": "SELECT sum(beds) FROM Rooms WHERE bedtype = 'King';", "raw_output": "SELECT COUNT(*) FROM Rooms WHERE bedType = 'King';", "status": "wrong_result", "error_message": "", "pred_rows": 1, "gold_rows": 1, "prompt_tokens": 576, "new_tokens": 14}
33
+ {"qid": "gate_0032", "split": "gate", "db_id": "club_1", "question": "How many students are there?", "gold_sql": "SELECT count(*) FROM student", "raw_output": "SELECT COUNT(*) FROM Student;", "status": "correct", "error_message": "", "pred_rows": 1, "gold_rows": 1, "prompt_tokens": 571, "new_tokens": 8}
34
+ {"qid": "gate_0033", "split": "gate", "db_id": "tracking_orders", "question": "What are the distinct details of invoices created before 1989-09-03 or after 2007-12-25?", "gold_sql": "SELECT DISTINCT invoice_details FROM invoices WHERE invoice_date < \"1989-09-03\" OR invoice_date > \"2007-12-25\"", "raw_output": "SELECT DISTINCT\n i.invoice_details\nFROM\n Invoices i\nWHERE\n i.invoice_date < '1989-09-03'\n OR i.invoice_date > '2007-12-25';", "status": "correct", "error_message": "", "pred_rows": 8, "gold_rows": 8, "prompt_tokens": 880, "new_tokens": 50}
35
+ {"qid": "gate_0034", "split": "gate", "db_id": "student_1", "question": "Find the number of students in total.", "gold_sql": "SELECT count(*) FROM list", "raw_output": "SELECT COUNT(*) AS total_students\nFROM list;", "status": "correct", "error_message": "", "pred_rows": 1, "gold_rows": 1, "prompt_tokens": 509, "new_tokens": 13}
36
+ {"qid": "gate_0035", "split": "gate", "db_id": "behavior_monitoring", "question": "Find all information about student addresses, and sort by monthly rental in descending order.", "gold_sql": "SELECT * FROM Student_Addresses ORDER BY monthly_rental DESC", "raw_output": "SELECT\n s.student_id,\n s.address_id,\n a.line_1,\n a.city,\n a.zip_postcode,\n a.state_province_county,\n a.country,\n a.other_address_details,\n sa.monthly_rental\nFROM\n Students s\nJOIN\n Student_Addresses sa ON s.student_id = sa.student_id\nJOIN\n Addresses a ON sa.address_id = a.address_id\nORDER BY\n sa.monthly_rental DESC;", "status": "wrong_result", "error_message": "", "pred_rows": 20, "gold_rows": 20, "prompt_tokens": 1390, "new_tokens": 106}
37
+ {"qid": "gate_0036", "split": "gate", "db_id": "cre_Doc_Control_Systems", "question": "For each document, list the number of employees who have showed up in the circulation history of that document. List the document ids and number of employees.", "gold_sql": "SELECT document_id , count(DISTINCT employee_id) FROM Circulation_History GROUP BY document_id;", "raw_output": "SELECT \n Documents.document_id,\n COUNT(DISTINCT Circulation_History.employee_id) AS employee_count\nFROM \n Documents\nLEFT JOIN \n Circulation_History ON Documents.document_id = Circulation_History.document_id\nGROUP BY \n Documents.document_id;", "status": "wrong_result", "error_message": "", "pred_rows": 15, "gold_rows": 4, "prompt_tokens": 1099, "new_tokens": 59}
38
+ {"qid": "gate_0037", "split": "gate", "db_id": "customers_and_addresses", "question": "Return the channel code and contact number of the customer contact channel whose active duration was the longest.", "gold_sql": "SELECT channel_code , contact_number FROM customer_contact_channels WHERE active_to_date - active_from_date = (SELECT active_to_date - active_from_date FROM customer_contact_channels ORDER BY (active_to_date - active_from_date) DESC LIMIT 1)", "raw_output": "```sql\nSELECT\n ccc.channel_code,\n ccc.contact_number\nFROM\n Customer_Contact_Channels ccc\nJOIN\n Customers c ON ccc.customer_id = c.customer_id\nWHERE\n cccc.active_to_date IS NULL\nORDER BY\n DATEDIFF(ccc.active_to_date, cccc.active_from_date) DESC\nLIMIT 1;\n```", "status": "sql_error", "error_message": "no such column: cccc.active_to_date", "pred_rows": null, "gold_rows": 17, "prompt_tokens": 899, "new_tokens": 86}
39
+ {"qid": "gate_0038", "split": "gate", "db_id": "formula_1", "question": "What are the unique names of races that held after 2000 and the circuits were in Spain?", "gold_sql": "SELECT DISTINCT T1.name FROM races AS T1 JOIN circuits AS T2 ON T1.circuitid = T2.circuitid WHERE T2.country = \"Spain\" AND T1.year > 2000", "raw_output": "SELECT DISTINCT r.name\nFROM races r\nJOIN circuits c ON r.circuitId = c.circuitId\nWHERE r.year > 2000 AND c.location = 'Spain';", "status": "wrong_result", "error_message": "", "pred_rows": 0, "gold_rows": 2, "prompt_tokens": 1502, "new_tokens": 41}
40
+ {"qid": "gate_0039", "split": "gate", "db_id": "tracking_share_transactions", "question": "Show the average amount of transactions for different lots, ordered by average amount of transactions.", "gold_sql": "SELECT T2.lot_id , avg(amount_of_transaction) FROM TRANSACTIONS AS T1 JOIN Transactions_Lots AS T2 ON T1.transaction_id = T2.transaction_id GROUP BY T2.lot_id ORDER BY avg(amount_of_transaction)", "raw_output": "SELECT\n l.lot_details,\n AVG(t.amount_of_transaction) AS average_transaction_amount\nFROM\n Lots l\nJOIN\n Transactions_Lots tl ON l.lot_id = tl.lot_id\nJOIN\n Transactions t ON tl.transaction_id = t.transaction_id\nGROUP BY\n l.lot_details\nORDER BY\n average_transaction_amount DESC;", "status": "wrong_result", "error_message": "", "pred_rows": 6, "gold_rows": 9, "prompt_tokens": 816, "new_tokens": 80}
41
+ {"qid": "gate_0040", "split": "gate", "db_id": "game_1", "question": "What are the first names for all students who are from the major numbered 600?", "gold_sql": "SELECT Fname FROM Student WHERE Major = 600", "raw_output": "SELECT DISTINCT Fname\nFROM Student\nWHERE Major = 600;", "status": "correct", "error_message": "", "pred_rows": 18, "gold_rows": 18, "prompt_tokens": 635, "new_tokens": 16}
42
+ {"qid": "gate_0041", "split": "gate", "db_id": "customers_card_transactions", "question": "What are the ids and first names of customers who do not hold a credit card?", "gold_sql": "SELECT customer_id , customer_first_name FROM Customers EXCEPT SELECT T1.customer_id , T2.customer_first_name FROM Customers_cards AS T1 JOIN Customers AS T2 ON T1.customer_id = T2.customer_id WHERE card_type_code = \"Credit\"", "raw_output": "SELECT DISTINCT c.customer_id, c.customer_first_name\nFROM Customers c\nWHERE c.customer_id NOT IN (\n SELECT cc.customer_id\n FROM Customers_Cards cc\n WHERE cc.card_type_code = 'Credit'\n);", "status": "correct", "error_message": "", "pred_rows": 9, "gold_rows": 9, "prompt_tokens": 740, "new_tokens": 52}
43
+ {"qid": "gate_0042", "split": "gate", "db_id": "ship_1", "question": "List all ship names in the order of built year and class.", "gold_sql": "SELECT name FROM ship ORDER BY built_year , CLASS", "raw_output": "SELECT Name, Built_Year, Class\nFROM Ship\nORDER BY Built_Year, Class;", "status": "wrong_result", "error_message": "", "pred_rows": 9, "gold_rows": 9, "prompt_tokens": 529, "new_tokens": 22}
44
+ {"qid": "gate_0043", "split": "gate", "db_id": "behavior_monitoring", "question": "Find the id and city of the student address with the highest average monthly rental.", "gold_sql": "SELECT T2.address_id , T1.city FROM Addresses AS T1 JOIN Student_Addresses AS T2 ON T1.address_id = T2.address_id GROUP BY T2.address_id ORDER BY AVG(monthly_rental) DESC LIMIT 1", "raw_output": "SELECT\n s.student_id,\n a.city\nFROM\n Students s\nJOIN\n Student_Addresses sa ON s.student_id = sa.student_id\nJOIN\n Addresses a ON sa.address_id = a.address_id\nGROUP BY\n s.student_id, a.city\nORDER BY\n AVG(sa.monthly_rental) DESC\nLIMIT 1;", "status": "wrong_result", "error_message": "", "pred_rows": 1, "gold_rows": 1, "prompt_tokens": 1390, "new_tokens": 81}
45
+ {"qid": "gate_0044", "split": "gate", "db_id": "hr_1", "question": "What the full names, ids of each employee and the name of the country they are in?", "gold_sql": "SELECT T1.first_name , T1.last_name , T1.employee_id , T4.country_name FROM employees AS T1 JOIN departments AS T2 ON T1.department_id = T2.department_id JOIN locations AS T3 ON T2.location_id = T3.location_id JOIN countries AS T4 ON T3.country_id = T4.country_id", "raw_output": "SELECT\n e.FIRST_NAME,\n e.LAST_NAME,\n e.EMPLOYEE_ID,\n c.COUNTRY_NAME\nFROM\n employees e\nJOIN\n countries c ON e.COUNTRY_ID = c.COUNTRY_ID;", "status": "sql_error", "error_message": "no such column: e.COUNTRY_ID", "pred_rows": null, "gold_rows": 72, "prompt_tokens": 1153, "new_tokens": 57}
46
+ {"qid": "gate_0045", "split": "gate", "db_id": "student_1", "question": "Which teachers teach in classroom 110? Give me their first names.", "gold_sql": "SELECT firstname FROM teachers WHERE classroom = 110", "raw_output": "SELECT DISTINCT t.FirstName\nFROM teachers t\nWHERE t.Classroom = 110;", "status": "correct", "error_message": "", "pred_rows": 1, "gold_rows": 1, "prompt_tokens": 515, "new_tokens": 20}
47
+ {"qid": "gate_0046", "split": "gate", "db_id": "university_basketball", "question": "How many universities have a location that contains NY?", "gold_sql": "SELECT count(*) FROM university WHERE LOCATION LIKE \"%NY%\"", "raw_output": "SELECT COUNT(DISTINCT u.School_ID)\nFROM university u\nWHERE u.Location LIKE '%NY%';", "status": "correct", "error_message": "", "pred_rows": 1, "gold_rows": 1, "prompt_tokens": 596, "new_tokens": 24}
48
+ {"qid": "gate_0047", "split": "gate", "db_id": "customers_and_addresses", "question": "What is the \"active to date\" of the latest contact channel used by \"Tillman Ernser\"?", "gold_sql": "SELECT max(t2.active_to_date) FROM customers AS t1 JOIN customer_contact_channels AS t2 ON t1.customer_id = t2.customer_id WHERE t1.customer_name = \"Tillman Ernser\"", "raw_output": "```sql\nSELECT\n ccc.active_to_date\nFROM\n Customers c\nJOIN\n Customer_Contact_Channels ccc ON c.customer_id = ccc.customer_id\nWHERE\n c.customer_name = 'Tillman Ernser'\nORDER BY\n ccc.active_to_date DESC\nLIMIT 1;\n```", "status": "correct", "error_message": "", "pred_rows": 1, "gold_rows": 1, "prompt_tokens": 902, "new_tokens": 73}
49
+ {"qid": "gate_0048", "split": "gate", "db_id": "university_basketball", "question": "Count the number of different affiliation types.", "gold_sql": "SELECT count(DISTINCT affiliation) FROM university", "raw_output": "SELECT COUNT(DISTINCT Affiliation) FROM university;", "status": "correct", "error_message": "", "pred_rows": 1, "gold_rows": 1, "prompt_tokens": 594, "new_tokens": 13}
50
+ {"qid": "gate_0049", "split": "gate", "db_id": "customers_card_transactions", "question": "Give the full name and customer id of the customer with the fewest accounts.", "gold_sql": "SELECT T2.customer_first_name , T2.customer_last_name , T1.customer_id FROM Accounts AS T1 JOIN Customers AS T2 ON T1.customer_id = T2.customer_id GROUP BY T1.customer_id ORDER BY count(*) ASC LIMIT 1", "raw_output": "SELECT\n c.customer_first_name,\n c.customer_last_name,\n c.customer_id\nFROM\n Customers c\nGROUP BY\n c.customer_id\nORDER BY\n COUNT(DISTINCT a.account_id) ASC\nLIMIT 1;", "status": "sql_error", "error_message": "no such column: a.account_id", "pred_rows": null, "gold_rows": 1, "prompt_tokens": 739, "new_tokens": 58}
51
+ {"qid": "gate_0050", "split": "gate", "db_id": "insurance_policies", "question": "Count the total number of settlements made.", "gold_sql": "SELECT count(*) FROM Settlements", "raw_output": "SELECT COUNT(*) AS Total_Settlements\nFROM Settlements;", "status": "correct", "error_message": "", "pred_rows": 1, "gold_rows": 1, "prompt_tokens": 726, "new_tokens": 15}
52
+ {"qid": "gate_0051", "split": "gate", "db_id": "medicine_enzyme_interaction", "question": "What are the names of enzymes that include the string 'ALA'?", "gold_sql": "SELECT name FROM enzyme WHERE name LIKE \"%ALA%\"", "raw_output": "SELECT DISTINCT e.name\nFROM enzyme e\nWHERE e.name LIKE '%ALA%';", "status": "correct", "error_message": "", "pred_rows": 2, "gold_rows": 2, "prompt_tokens": 580, "new_tokens": 19}
53
+ {"qid": "gate_0052", "split": "gate", "db_id": "student_1", "question": "Which students in third grade are not taught by teacher COVIN JEROME? Give me the last names of the students.", "gold_sql": "SELECT DISTINCT T1.lastname FROM list AS T1 JOIN teachers AS T2 ON T1.classroom = T2.classroom WHERE T1.grade = 3 AND T2.firstname != \"COVIN\" AND T2.lastname != \"JEROME\"", "raw_output": "SELECT DISTINCT t.LastName\nFROM list AS l\nLEFT JOIN teachers AS t ON l.Grade = t.Grade AND l.Classroom = t.Classroom\nWHERE l.Grade = 3 AND t.FirstName = 'COVIN' AND t.LastName = 'JEROME'\nAND t.FirstName IS NULL;", "status": "sql_error", "error_message": "no such column: t.Grade", "pred_rows": null, "gold_rows": 6, "prompt_tokens": 527, "new_tokens": 70}
54
+ {"qid": "gate_0053", "split": "gate", "db_id": "tracking_share_transactions", "question": "What are the details of all sales and purchases?", "gold_sql": "SELECT sales_details FROM sales UNION SELECT purchase_details FROM purchases", "raw_output": "SELECT\n s.sales_details AS sales_details,\n p.purchase_details AS purchase_details\nFROM\n Sales s\nJOIN\n Purchases p ON s.sales_transaction_id = p.purchase_transaction_id;", "status": "wrong_result", "error_message": "", "pred_rows": 15, "gold_rows": 16, "prompt_tokens": 809, "new_tokens": 48}
55
+ {"qid": "gate_0054", "split": "gate", "db_id": "inn_1", "question": "What is the decor of room Recluse and defiance?", "gold_sql": "SELECT decor FROM Rooms WHERE roomName = \"Recluse and defiance\";", "raw_output": "SELECT decor FROM Rooms WHERE roomName = 'Recluse and defiance';", "status": "correct", "error_message": "", "pred_rows": 1, "gold_rows": 1, "prompt_tokens": 580, "new_tokens": 16}
56
+ {"qid": "gate_0055", "split": "gate", "db_id": "inn_1", "question": "Find the name of rooms whose price is higher than the average price.", "gold_sql": "SELECT roomName FROM Rooms WHERE basePrice > ( SELECT avg(basePrice) FROM Rooms );", "raw_output": "SELECT r.roomName\nFROM Rooms r\nJOIN Reservations pr ON r.RoomId = pr.Room\nGROUP BY r.roomName\nHAVING AVG(pr.Rate) > (\n SELECT AVG(Rate)\n FROM Reservations\n);\n", "status": "wrong_result", "error_message": "", "pred_rows": 5, "gold_rows": 4, "prompt_tokens": 583, "new_tokens": 55}
57
+ {"qid": "gate_0056", "split": "gate", "db_id": "small_bank_1", "question": "Find the name, checking balance and savings balance of all accounts in the bank sorted by their total checking and savings balance in descending order.", "gold_sql": "SELECT T2.balance , T3.balance , T1.name FROM accounts AS T1 JOIN checking AS T2 ON T1.custid = T2.custid JOIN savings AS T3 ON T1.custid = T3.custid ORDER BY T2.balance + T3.balance DESC", "raw_output": "SELECT\n a.name,\n c.balance AS checking_balance,\n s.balance AS savings_balance\nFROM\n ACCOUNTS a\nJOIN\n CHECKING c ON a.custid = c.custid\nJOIN\n SAVINGS s ON a.custid = s.custid\nORDER BY\n (c.balance + s.balance) DESC;", "status": "wrong_result", "error_message": "", "pred_rows": 6, "gold_rows": 6, "prompt_tokens": 553, "new_tokens": 88}
58
+ {"qid": "gate_0057", "split": "gate", "db_id": "tracking_orders", "question": "List the ids of all distinct orders ordered by placed date.", "gold_sql": "SELECT DISTINCT order_id FROM orders ORDER BY date_order_placed", "raw_output": "SELECT DISTINCT o.order_id\nFROM Orders o\nORDER BY o.date_order_placed;", "status": "correct", "error_message": "", "pred_rows": 15, "gold_rows": 15, "prompt_tokens": 866, "new_tokens": 20}
59
+ {"qid": "gate_0058", "split": "gate", "db_id": "inn_1", "question": "What are the name of rooms that cost more than the average.", "gold_sql": "SELECT roomName FROM Rooms WHERE basePrice > ( SELECT avg(basePrice) FROM Rooms );", "raw_output": "SELECT r.roomName\nFROM Rooms r\nJOIN (\n SELECT AVG(basePrice) AS avgPrice\n FROM Rooms\n) avgRooms\nON r.basePrice > avgPrice;", "status": "correct", "error_message": "", "pred_rows": 4, "gold_rows": 4, "prompt_tokens": 582, "new_tokens": 42}
60
+ {"qid": "gate_0059", "split": "gate", "db_id": "machine_repair", "question": "What is the team and starting year for each technician?", "gold_sql": "SELECT Team , Starting_Year FROM technician", "raw_output": "SELECT Team, Starting_Year\nFROM technician;", "status": "correct", "error_message": "", "pred_rows": 10, "gold_rows": 10, "prompt_tokens": 664, "new_tokens": 12}
61
+ {"qid": "gate_0060", "split": "gate", "db_id": "club_1", "question": "Find the location of the club \"Pen and Paper Gaming\".", "gold_sql": "SELECT clublocation FROM club WHERE clubname = \"Pen and Paper Gaming\"", "raw_output": "SELECT ClubLocation\nFROM Club\nWHERE ClubName = 'Pen and Paper Gaming';", "status": "correct", "error_message": "", "pred_rows": 1, "gold_rows": 1, "prompt_tokens": 577, "new_tokens": 19}
62
+ {"qid": "gate_0061", "split": "gate", "db_id": "inn_1", "question": "How many rooms have a king bed?", "gold_sql": "SELECT count(*) FROM Rooms WHERE bedType = \"King\";", "raw_output": "SELECT COUNT(*)\nFROM Rooms\nWHERE bedType = 'King';", "status": "correct", "error_message": "", "pred_rows": 1, "gold_rows": 1, "prompt_tokens": 577, "new_tokens": 16}
63
+ {"qid": "gate_0062", "split": "gate", "db_id": "race_track", "question": "Give the different locations of tracks.", "gold_sql": "SELECT DISTINCT LOCATION FROM track", "raw_output": "SELECT DISTINCT Location\nFROM track;", "status": "correct", "error_message": "", "pred_rows": 9, "gold_rows": 9, "prompt_tokens": 512, "new_tokens": 9}
64
+ {"qid": "gate_0063", "split": "gate", "db_id": "store_product", "question": "What is the city with the most number of flagship stores?", "gold_sql": "SELECT t3.headquartered_city FROM store AS t1 JOIN store_district AS t2 ON t1.store_id = t2.store_id JOIN district AS t3 ON t2.district_id = t3.district_id GROUP BY t3.headquartered_city ORDER BY count(*) DESC LIMIT 1", "raw_output": "SELECT t1.Headquartered_City, COUNT(*) AS Flagship_Store_Count\nFROM district t1\nJOIN store_district t2 ON t1.District_ID = t2.District_ID\nJOIN store t3 ON t2.Store_ID = t3.Store_ID\nWHERE t3.Type = 'Flagship'\nGROUP BY t1.Headquartered_City\nORDER BY Flagship_Store_Count DESC\nLIMIT 1;", "status": "wrong_result", "error_message": "", "pred_rows": 0, "gold_rows": 1, "prompt_tokens": 701, "new_tokens": 97}
65
+ {"qid": "gate_0064", "split": "gate", "db_id": "wedding", "question": "Show the name and opening year for three churches that opened most recently.", "gold_sql": "SELECT name , open_date FROM church ORDER BY open_date DESC LIMIT 3", "raw_output": "SELECT c.Name, c.Open_Date\nFROM church c\nWHERE c.Open_Date = (\n SELECT MAX(t.Open_Date)\n FROM wedding w\n JOIN church t ON w.Church_ID = t.Church_ID\n);\n", "status": "wrong_result", "error_message": "", "pred_rows": 1, "gold_rows": 3, "prompt_tokens": 604, "new_tokens": 51}
66
+ {"qid": "gate_0065", "split": "gate", "db_id": "formula_1", "question": "How many drivers did not participate in the races held in 2009?", "gold_sql": "SELECT count(DISTINCT driverId) FROM results WHERE raceId NOT IN( SELECT raceId FROM races WHERE YEAR != 2009 )", "raw_output": "SELECT COUNT(DISTINCT d.driverId)\nFROM drivers d\nWHERE NOT EXISTS (\n SELECT 1\n FROM races r\n WHERE r.year = 2009\n AND NOT EXISTS (\n SELECT 1\n FROM results res\n WHERE res.raceId = r.raceId\n AND res.driverId = d.driverId\n )\n);", "status": "wrong_result", "error_message": "", "pred_rows": 1, "gold_rows": 1, "prompt_tokens": 1497, "new_tokens": 82}
67
+ {"qid": "gate_0066", "split": "gate", "db_id": "train_station", "question": "Show the station name and number of trains in each station.", "gold_sql": "SELECT T2.name , count(*) FROM train_station AS T1 JOIN station AS T2 ON T1.station_id = T2.station_id GROUP BY T1.station_id", "raw_output": "SELECT s.Name, COUNT(t.Station_ID) AS Number_of_Trains\nFROM station s\nJOIN train_station ts ON s.Station_ID = ts.Station_ID\nGROUP BY s.Name;", "status": "sql_error", "error_message": "no such column: t.Station_ID", "pred_rows": null, "gold_rows": 7, "prompt_tokens": 583, "new_tokens": 45}
68
+ {"qid": "gate_0067", "split": "gate", "db_id": "candidate_poll", "question": "What are the average height and weight across males (sex is M)?", "gold_sql": "SELECT avg(height) , avg(weight) FROM people WHERE sex = 'M'", "raw_output": "SELECT AVG(p.Height) AS Average_Height, AVG(p.Weight) AS Average_Weight\nFROM people p\nWHERE p.Sex = 'M';", "status": "correct", "error_message": "", "pred_rows": 1, "gold_rows": 1, "prompt_tokens": 545, "new_tokens": 35}
69
+ {"qid": "gate_0068", "split": "gate", "db_id": "department_management", "question": "Which department has more than 1 head at a time? List the id, name and the number of heads.", "gold_sql": "SELECT T1.department_id , T1.name , count(*) FROM management AS T2 JOIN department AS T1 ON T1.department_id = T2.department_id GROUP BY T1.department_id HAVING count(*) > 1", "raw_output": "SELECT d.Department_ID, d.Name, COUNT(m.head_ID) AS Num_Heads\nFROM department d\nJOIN management m ON d.Department_ID = m.department_ID\nGROUP BY d.Department_ID, d.Name\nHAVING COUNT(m.head_ID) > 1;", "status": "correct", "error_message": "", "pred_rows": 1, "gold_rows": 1, "prompt_tokens": 585, "new_tokens": 63}
70
+ {"qid": "gate_0069", "split": "gate", "db_id": "insurance_policies", "question": "How many settlements are there in total?", "gold_sql": "SELECT count(*) FROM Settlements", "raw_output": "SELECT COUNT(*) AS Total_Settlements\nFROM Settlements;", "status": "correct", "error_message": "", "pred_rows": 1, "gold_rows": 1, "prompt_tokens": 726, "new_tokens": 15}
71
+ {"qid": "gate_0070", "split": "gate", "db_id": "ship_1", "question": "Find the name, type, and flag of the ship that is built in the most recent year.", "gold_sql": "SELECT name , TYPE , flag FROM ship ORDER BY built_year DESC LIMIT 1", "raw_output": "SELECT Name, Type, Flag\nFROM Ship\nWHERE Built_Year = (\n SELECT MAX(Built_Year)\n FROM Ship\n);", "status": "wrong_result", "error_message": "", "pred_rows": 4, "gold_rows": 1, "prompt_tokens": 536, "new_tokens": 31}
72
+ {"qid": "gate_0071", "split": "gate", "db_id": "tracking_share_transactions", "question": "Show the maximum amount of transaction.", "gold_sql": "SELECT max(amount_of_transaction) FROM TRANSACTIONS", "raw_output": "SELECT MAX(amount_of_transaction) AS max_transaction_amount\nFROM Transactions;", "status": "correct", "error_message": "", "pred_rows": 1, "gold_rows": 1, "prompt_tokens": 806, "new_tokens": 16}
73
+ {"qid": "gate_0072", "split": "gate", "db_id": "perpetrator", "question": "List the number of people injured by perpetrators in ascending order.", "gold_sql": "SELECT Injured FROM perpetrator ORDER BY Injured ASC", "raw_output": "SELECT COUNT(p.People_ID) AS Injured_People\nFROM perpetrator p\nJOIN people p2 ON p.People_ID = p2.People_ID\nWHERE p.Injured > 0\nORDER BY p.Injured ASC;", "status": "wrong_result", "error_message": "", "pred_rows": 1, "gold_rows": 5, "prompt_tokens": 536, "new_tokens": 56}
74
+ {"qid": "gate_0073", "split": "gate", "db_id": "candidate_poll", "question": "What are the names of candidates who have a lower support rate than oppose rate?", "gold_sql": "SELECT t1.name FROM people AS t1 JOIN candidate AS t2 ON t1.people_id = t2.people_id WHERE t2.support_rate < t2.oppose_rate", "raw_output": "SELECT p.Name\nFROM people p\nJOIN candidate c ON p.People_ID = c.People_ID\nWHERE c.Support_rate < c.Oppose_rate;", "status": "correct", "error_message": "", "pred_rows": 6, "gold_rows": 6, "prompt_tokens": 547, "new_tokens": 39}
75
+ {"qid": "gate_0074", "split": "gate", "db_id": "wedding", "question": "How many weddings are there in year 2016?", "gold_sql": "SELECT count(*) FROM wedding WHERE YEAR = 2016", "raw_output": "SELECT COUNT(*)\nFROM wedding\nWHERE YEAR = 2016;", "status": "correct", "error_message": "", "pred_rows": 1, "gold_rows": 1, "prompt_tokens": 601, "new_tokens": 16}
76
+ {"qid": "gate_0075", "split": "gate", "db_id": "insurance_policies", "question": "List the date the claim was made, the date it was settled and the amount settled for all the claims which had exactly one settlement.", "gold_sql": "SELECT T1.claim_id , T1.date_claim_made , T1.Date_Claim_Settled FROM Claims AS T1 JOIN Settlements AS T2 ON T1.Claim_id = T2.Claim_id GROUP BY T1.claim_id HAVING count(*) = 1", "raw_output": "SELECT\n c.Date_Claim_Made,\n s.Date_Claim_Settled,\n s.Amount_Settled\nFROM\n Claims c\nJOIN\n Settlements s ON c.Claim_ID = s.Claim_ID\nWHERE\n COUNT(DISTINCT s.Settlement_ID) = 1;", "status": "sql_error", "error_message": "misuse of aggregate function COUNT()", "pred_rows": null, "gold_rows": 5, "prompt_tokens": 745, "new_tokens": 70}
77
+ {"qid": "gate_0076", "split": "gate", "db_id": "film_rank", "question": "What are the titles of films that do not have a film market estimation?", "gold_sql": "SELECT Title FROM film WHERE Film_ID NOT IN (SELECT Film_ID FROM film_market_estimation)", "raw_output": "SELECT DISTINCT f.Title\nFROM film f\nWHERE f.Film_ID NOT IN (\n SELECT fm.film_id\n FROM film_market_estimation fme\n WHERE fm.film_id IS NOT NULL\n);", "status": "sql_error", "error_message": "no such column: fm.film_id", "pred_rows": null, "gold_rows": 9, "prompt_tokens": 588, "new_tokens": 50}
78
+ {"qid": "gate_0077", "split": "gate", "db_id": "club_1", "question": "What is the location of the club named \"Tennis Club\"?", "gold_sql": "SELECT clublocation FROM club WHERE clubname = \"Tennis Club\"", "raw_output": "SELECT ClubLocation\nFROM Club\nWHERE ClubName = 'Tennis Club';", "status": "correct", "error_message": "", "pred_rows": 1, "gold_rows": 1, "prompt_tokens": 579, "new_tokens": 18}
79
+ {"qid": "gate_0078", "split": "gate", "db_id": "game_1", "question": "Count the number of video games with Massively multiplayer online game type .", "gold_sql": "SELECT count(*) FROM Video_games WHERE gtype = \"Massively multiplayer online game\"", "raw_output": "SELECT COUNT(*) FROM Video_Games WHERE GType = 'Massively multiplayer online';", "status": "wrong_result", "error_message": "", "pred_rows": 1, "gold_rows": 1, "prompt_tokens": 632, "new_tokens": 19}
80
+ {"qid": "gate_0079", "split": "gate", "db_id": "store_product", "question": "For each type of store, how many of them are there?", "gold_sql": "SELECT TYPE , count(*) FROM store GROUP BY TYPE", "raw_output": "SELECT Type, COUNT(Store_ID) AS StoreCount\nFROM store\nGROUP BY Type;", "status": "correct", "error_message": "", "pred_rows": 2, "gold_rows": 2, "prompt_tokens": 702, "new_tokens": 21}
81
+ {"qid": "gate_0080", "split": "gate", "db_id": "candidate_poll", "question": "Please list support, consider, and oppose rates for each candidate in ascending order by unsure rate.", "gold_sql": "SELECT Support_rate , Consider_rate , Oppose_rate FROM candidate ORDER BY unsure_rate", "raw_output": "SELECT\n C.Candidate_ID,\n C.Poll_Source,\n C.Support_rate,\n C.consider_rate,\n C.Oppose_rate,\n C.Unsure_rate\nFROM\n candidate AS C\nORDER BY\n C.Unsure_rate ASC;", "status": "wrong_result", "error_message": "", "pred_rows": 6, "gold_rows": 6, "prompt_tokens": 550, "new_tokens": 61}
82
+ {"qid": "gate_0081", "split": "gate", "db_id": "soccer_1", "question": "List all of the ids for left-footed players with a height between 180cm and 190cm.", "gold_sql": "SELECT player_api_id FROM Player WHERE height >= 180 AND height <= 190 INTERSECT SELECT player_api_id FROM Player_Attributes WHERE preferred_foot = \"left\"", "raw_output": "SELECT DISTINCT\n p.player_api_id\nFROM\n Player p\nJOIN\n Player_Attributes pa ON p.player_api_id = pa.player_api_id\nWHERE\n pa.preferred_foot = 'left'\n AND p.height BETWEEN 180 AND 190;", "status": "correct", "error_message": "", "pred_rows": 1673, "gold_rows": 1673, "prompt_tokens": 1527, "new_tokens": 61}
83
+ {"qid": "gate_0082", "split": "gate", "db_id": "twitter_1", "question": "Find the emails of the user named \"Mary\".", "gold_sql": "SELECT email FROM user_profiles WHERE name = 'Mary'", "raw_output": "SELECT DISTINCT email\nFROM user_profiles\nWHERE name = 'Mary';", "status": "correct", "error_message": "", "pred_rows": 1, "gold_rows": 1, "prompt_tokens": 632, "new_tokens": 17}
84
+ {"qid": "gate_0083", "split": "gate", "db_id": "sakila_1", "question": "Which film actors (actresses) played a role in more than 30 films? List his or her first name and last name.", "gold_sql": "SELECT T2.first_name , T2.last_name FROM film_actor AS T1 JOIN actor AS T2 ON T1.actor_id = T2.actor_id GROUP BY T2.actor_id HAVING count(*) > 30", "raw_output": "```sql\nSELECT a.first_name, a.last_name\nFROM actor a\nJOIN film_actor fa ON a.actor_id = fa.actor_id\nGROUP BY a.actor_id, a.first_name, a.last_name\nHAVING COUNT(fa.film_id) > 30;\n```", "status": "correct", "error_message": "", "pred_rows": 56, "gold_rows": 56, "prompt_tokens": 1933, "new_tokens": 65}
85
+ {"qid": "gate_0084", "split": "gate", "db_id": "pilot_record", "question": "What is the joined year of the pilot of the highest rank?", "gold_sql": "SELECT Join_Year FROM pilot ORDER BY Rank ASC LIMIT 1", "raw_output": "SELECT `Join_Year`\nFROM `pilot`\nWHERE `Rank` = (SELECT MAX(`Rank`) FROM `pilot`);", "status": "wrong_result", "error_message": "", "pred_rows": 1, "gold_rows": 1, "prompt_tokens": 623, "new_tokens": 30}
86
+ {"qid": "gate_0085", "split": "gate", "db_id": "product_catalog", "question": "What are the attribute data types with more than 3 attribute definitions?", "gold_sql": "SELECT attribute_data_type FROM Attribute_Definitions GROUP BY attribute_data_type HAVING count(*) > 3", "raw_output": "SELECT ad.attribute_data_type\nFROM Attribute_Definitions ad\nGROUP BY ad.attribute_data_type\nHAVING COUNT(*) > 3;", "status": "correct", "error_message": "", "pred_rows": 1, "gold_rows": 1, "prompt_tokens": 821, "new_tokens": 32}
87
+ {"qid": "gate_0086", "split": "gate", "db_id": "race_track", "question": "What is the name of the track that has had the greatest number of races?", "gold_sql": "SELECT T2.name FROM race AS T1 JOIN track AS T2 ON T1.track_id = T2.track_id GROUP BY T1.track_id ORDER BY count(*) DESC LIMIT 1", "raw_output": "SELECT t.Name\nFROM track t\nJOIN race r ON t.Track_ID = r.Track_ID\nGROUP BY t.Track_ID, t.Name\nORDER BY COUNT(*) DESC\nLIMIT 1;", "status": "correct", "error_message": "", "pred_rows": 1, "gold_rows": 1, "prompt_tokens": 521, "new_tokens": 45}
88
+ {"qid": "gate_0087", "split": "gate", "db_id": "train_station", "question": "Show the station name with at least two trains.", "gold_sql": "SELECT T2.name FROM train_station AS T1 JOIN station AS T2 ON T1.station_id = T2.station_id GROUP BY T1.station_id HAVING count(*) >= 2", "raw_output": "SELECT DISTINCT s.Name\nFROM station s\nJOIN train_station ts ON s.Station_ID = ts.Station_ID\nGROUP BY s.Name\nHAVING COUNT(DISTINCT ts.Train_ID) >= 2;", "status": "correct", "error_message": "", "pred_rows": 3, "gold_rows": 3, "prompt_tokens": 581, "new_tokens": 49}
89
+ {"qid": "gate_0088", "split": "gate", "db_id": "pilot_record", "question": "List the names of pilots in ascending order of rank.", "gold_sql": "SELECT Pilot_name FROM pilot ORDER BY Rank ASC", "raw_output": "SELECT DISTINCT p.Pilot_name\nFROM pilot p\nORDER BY p.Rank ASC;", "status": "correct", "error_message": "", "pred_rows": 5, "gold_rows": 5, "prompt_tokens": 621, "new_tokens": 20}
90
+ {"qid": "gate_0089", "split": "gate", "db_id": "club_1", "question": "Find the average age of the members in the club \"Bootup Baltimore\".", "gold_sql": "SELECT avg(t3.age) FROM club AS t1 JOIN member_of_club AS t2 ON t1.clubid = t2.clubid JOIN student AS t3 ON t2.stuid = t3.stuid WHERE t1.clubname = \"Bootup Baltimore\"", "raw_output": "SELECT AVG(S.age) AS average_age\nFROM Student S\nJOIN Member_of_club MC ON S.StuID = MC.StuID\nWHERE MC.ClubID = (SELECT ClubID FROM Club WHERE ClubName = 'Bootup Baltimore');", "status": "correct", "error_message": "", "pred_rows": 1, "gold_rows": 1, "prompt_tokens": 580, "new_tokens": 56}
91
+ {"qid": "gate_0090", "split": "gate", "db_id": "cre_Doc_Control_Systems", "question": "What document type codes do we have?", "gold_sql": "SELECT document_type_code FROM Ref_Document_Types;", "raw_output": "SELECT DISTINCT document_type_code\nFROM Documents;", "status": "correct", "error_message": "", "pred_rows": 3, "gold_rows": 3, "prompt_tokens": 1077, "new_tokens": 11}
92
+ {"qid": "gate_0091", "split": "gate", "db_id": "student_1", "question": "Find the number of students taught by TARRING LEIA.", "gold_sql": "SELECT count(*) FROM list AS T1 JOIN teachers AS T2 ON T1.classroom = T2.classroom WHERE T2.firstname = \"TARRING\" AND T2.lastname = \"LEIA\"", "raw_output": "SELECT COUNT(*)\nFROM list\nWHERE LastName = 'TARRING' AND FirstName = 'LEIA';", "status": "correct", "error_message": "", "pred_rows": 1, "gold_rows": 1, "prompt_tokens": 514, "new_tokens": 26}
93
+ {"qid": "gate_0092", "split": "gate", "db_id": "tracking_share_transactions", "question": "Show the average share count of transactions for different investors.", "gold_sql": "SELECT investor_id , avg(share_count) FROM TRANSACTIONS GROUP BY investor_id", "raw_output": "SELECT\n i.investor_id,\n AVG(t.share_count) AS average_share_count\nFROM\n Investors i\nJOIN\n Transactions t ON i.investor_id = t.investor_id\nGROUP BY\n i.investor_id;", "status": "correct", "error_message": "", "pred_rows": 10, "gold_rows": 10, "prompt_tokens": 810, "new_tokens": 59}
94
+ {"qid": "gate_0093", "split": "gate", "db_id": "race_track", "question": "Return the names of tracks that have no had any races.", "gold_sql": "SELECT name FROM track WHERE track_id NOT IN (SELECT track_id FROM race)", "raw_output": "SELECT DISTINCT t.Name\nFROM track t\nWHERE NOT EXISTS (\n SELECT 1\n FROM race r\n WHERE r.Track_ID = t.Track_ID\n);", "status": "correct", "error_message": "", "pred_rows": 3, "gold_rows": 3, "prompt_tokens": 517, "new_tokens": 38}
95
+ {"qid": "gate_0094", "split": "gate", "db_id": "farm", "question": "Give the years and official names of the cities of each competition.", "gold_sql": "SELECT T2.Year , T1.Official_Name FROM city AS T1 JOIN farm_competition AS T2 ON T1.City_ID = T2.Host_city_ID", "raw_output": "SELECT\n fY.Year,\n c.Official_Name\nFROM\n farm_competition fc\nJOIN\n city c ON fc.Host_city_ID = c.City_ID\nJOIN\n farm f ON fc.Host_city_ID = c.City_ID AND fc.Year = f.Year;", "status": "sql_error", "error_message": "no such column: fY.Year", "pred_rows": null, "gold_rows": 6, "prompt_tokens": 688, "new_tokens": 69}
96
+ {"qid": "gate_0095", "split": "gate", "db_id": "product_catalog", "question": "Find the name and capacity of products with price greater than 700 (in USD).", "gold_sql": "SELECT catalog_entry_name , capacity FROM Catalog_Contents WHERE price_in_dollars > 700", "raw_output": "SELECT\n cc.catalog_entry_name,\n cc.capacity\nFROM\n Catalog_Contents cc\nJOIN\n Catalog_Contents_Additional_Attributes ca ON cc.catalog_entry_id = ca.catalog_entry_id\nWHERE\n cc.price_in_dollars > 700;", "status": "wrong_result", "error_message": "", "pred_rows": 3, "gold_rows": 5, "prompt_tokens": 824, "new_tokens": 63}
97
+ {"qid": "gate_0096", "split": "gate", "db_id": "customer_complaints", "question": "What are lines 1 and 2 of the addressed of the customer with the email \"vbogisich@example.org\"?", "gold_sql": "SELECT address_line_1 , address_line_2 FROM customers WHERE email_address = \"vbogisich@example.org\"", "raw_output": "SELECT\n address_line_1,\n address_line_2\nFROM\n Customers\nWHERE\n email_address = 'vbogisich@example.org';", "status": "correct", "error_message": "", "pred_rows": 1, "gold_rows": 1, "prompt_tokens": 822, "new_tokens": 35}
98
+ {"qid": "gate_0097", "split": "gate", "db_id": "customers_card_transactions", "question": "Return the id and full name of the customer who has the fewest accounts.", "gold_sql": "SELECT T1.customer_id , T2.customer_first_name , T2.customer_last_name FROM Customers_cards AS T1 JOIN Customers AS T2 ON T1.customer_id = T2.customer_id GROUP BY T1.customer_id ORDER BY count(*) ASC LIMIT 1", "raw_output": "SELECT\n c.customer_id,\n CONCAT(c.customer_first_name, ' ', c.customer_last_name) AS customer_full_name\nFROM\n Customers c\nGROUP BY\n c.customer_id\nORDER BY\n COUNT(DISTINCT a.account_id) ASC\nLIMIT 1;", "status": "sql_error", "error_message": "no such column: a.account_id", "pred_rows": null, "gold_rows": 1, "prompt_tokens": 739, "new_tokens": 66}
99
+ {"qid": "gate_0098", "split": "gate", "db_id": "manufacturer", "question": "what is the average number of factories and maximum number of shops for manufacturers that opened before 1990.", "gold_sql": "SELECT max(num_of_shops) , avg(Num_of_Factories) FROM manufacturer WHERE open_year < 1990", "raw_output": "SELECT\n m.Open_Year,\n AVG(m.Num_of_Factories) AS Average_Factories,\n MAX(m.Num_of_Shops) AS Max_Shops\nFROM\n manufacturer m\nWHERE\n m.Open_Year < 1990\nGROUP BY\n m.Open_Year;", "status": "wrong_result", "error_message": "", "pred_rows": 1, "gold_rows": 1, "prompt_tokens": 613, "new_tokens": 69}
100
+ {"qid": "gate_0099", "split": "gate", "db_id": "manufactory_1", "question": "What is the headquarter of the company whose founder is James?", "gold_sql": "SELECT headquarter FROM manufacturers WHERE founder = 'James'", "raw_output": "SELECT h.Headquarter\nFROM Manufacturers m\nJOIN Products p ON m.Code = p.Manufacturer\nWHERE m.Founder = 'James';", "status": "sql_error", "error_message": "no such column: h.Headquarter", "pred_rows": null, "gold_rows": 1, "prompt_tokens": 520, "new_tokens": 35}
runs/healed2-gate/summary.json ADDED
@@ -0,0 +1,18 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "split": "gate",
3
+ "model": "CohereLabs/tiny-aya-global",
4
+ "adapter": "HideIron/tiny-aya-global-sql-selfheal",
5
+ "n": 100,
6
+ "execution_accuracy": 0.51,
7
+ "valid_sql_rate": 0.81,
8
+ "status_counts": {
9
+ "wrong_result": 30,
10
+ "sql_error": 19,
11
+ "correct": 51
12
+ },
13
+ "generation_seconds": 65.11,
14
+ "new_tokens": 4462,
15
+ "tokens_per_second": 68.5,
16
+ "max_new_tokens": 256,
17
+ "decoding": "greedy"
18
+ }