MikeXydas/qr2t_benchmark huggingface dataset:
Table: FACULTY
Question: Find the rooms of faculties with rank professor who live in building NEB.
SQL query:
SELECT Room, Rank, Building 
 FROM FACULTY 
 WHERE Rank = 'Professor' AND Building = 'NEB'
Result:
,Rank,Room,Building
0,Professor,219,NEB

Answer: The faculty with rank Professor lives in room 219, in NEB building.
Table: bank
Question: What is the average number of customers across banks in the state of Utah?
SQL query:
SELECT AVG(no_of_customers) AS "average no_of_customers", state 
 FROM bank 
 WHERE state = 'Utah'
Result:
,state,average no_of_customers
0,Utah,123.0

Answer: The state of Utah has an average of 123 customers in its banks
Table: customers
Question: For each payment method, return how many customers use it.
SQL query:
SELECT payment_method_code, COUNT(*) AS "count of customers" 
 FROM customers 
 GROUP BY payment_method_code
Result:
,count of customers,payment_method_code
0,10,Credit Card

Answer: 10 customers use Credit Card as a payment method.
Table: club, member_of_club, student
Question: What is the average age of the members of the club "Bootup Baltimore"?
SQL query:
SELECT AVG(t3.age) AS "average age", t1.clubname AS "club clubname" 
 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'
Result:
,average age,club clubname
0,17.5,Bootup Baltimore

Answer: The club named Bootup Baltimore has an average age of 17.5.
Table: Activity
Question: List all the activities we have.
SQL query:
SELECT activity_name 
 FROM Activity
Result:
,activity_name
0,Mountain Climbing

Answer: There is the Mountain Climbing activity
Table: physician, trained_in, procedures
Question: Find the physician who was trained in the most expensive procedure?
SQL query:
SELECT T1.name AS "physician name", T3.cost AS "procedures cost" 
 FROM physician AS T1 JOIN trained_in AS T2 ON T1.employeeid = T2.physician JOIN procedures AS T3 ON T3.code = T2.treatment ORDER BY T3.cost DESC
Result:
,physician name,procedures cost
0,John Wen,10000.0

Answer: John Wen costed 10000
Table: building
Question: What are the average, maximum, and minimum number of floors for all buildings?
SQL query:
SELECT AVG(floors) AS "average floors", MAX(floors) AS "maximum floors", MIN(floors) AS "minimum floors" 
 FROM building
Result:
,average floors,maximum floors,minimum floors
0,27.5,42.0,10.0

Answer: The average number of floors for all buildings is 27.5 with a maximum of 42 and a minimum of 10
Table: Staff
Question: When did the staff member named Janessa Sawayn join the company?
SQL query:
SELECT date_joined_staff, last_name, first_name 
 FROM Staff 
 WHERE first_name = 'Janessa' AND last_name = 'Sawayn'
Result:
,last_name,first_name,date_joined_staff
0,Sawayn,Janessa,2017-04-27 03:21:26

Answer: The staff member named Janessa Sawayn join the company on 2017-04-27 03:21:26
Table: Payments
Question: Which Payments were processed with Visa? List the payment Id, the date and the amount.
SQL query:
SELECT Payment_ID, Date_Payment_Made, Amount_Payment, Payment_Method_Code 
 FROM Payments 
 WHERE Payment_Method_Code = 'Visa'
Result:
,Payment_ID,Amount_Payment,Date_Payment_Made,Payment_Method_Code
0,678,459407,2017-12-16,Visa

Answer: The payment with id 678 has an amount of 459407, was made at 2017-12-16 and the payment's method code was Visa.
Table: program
Question: What are the name, origin and owner of each program?
SQL query:
SELECT name, origin, OWNER 
 FROM program
Result:
,Name,Owner,Origin
0,Aniworld,Hunan Broadcasting System (HBS),Hunan

Answer: The origins of the programs with names Aniworld are Human and their owners are Hunan Broadcasting System (HBS)
Table: Apartment_Bookings, Apartments
Question: What is the average room count of the apartments whose booking status code is "Provisional"?
SQL query:
SELECT AVG(room_count) AS "average room_count", T1.booking_status_code AS "Apartment_Bookings booking_status_code" 
 FROM Apartment_Bookings AS T1 JOIN Apartments AS T2 ON T1.apt_id = T2.apt_id 
 WHERE T1.booking_status_code = 'Provisional'
Result:
,average room_count,Apartment_Bookings booking_status_code
0,6.5,Provisional

Answer: There are 6.5 rooms in average with booking status code Provisional.
Table: Apartments
Question: Which apartment type has the largest number of total rooms? Return the apartment type code, its number of bathrooms and number of bedrooms.
SQL query:
SELECT apt_type_code, bathroom_count, bedroom_count, room_count 
 FROM Apartments 
 GROUP BY apt_type_code ORDER BY SUM(room_count) DESC
Result:
,room_count,apt_type_code,bedroom_count,bathroom_count
0,7,Flat,3,1

Answer: The Flat apartment type has 3 bedrooms, 1 bathroom and counts 7 rooms in total
Table: CHARACTERISTICS
Question: How many characteristics are there?
SQL query:
SELECT COUNT(*) AS "count of CHARACTERISTICS" 
 FROM CHARACTERISTICS
Result:
,count of CHARACTERISTICS
0,15

Answer: There are 15 characteristics.
Table: physician, prescribes
Question: Find the physician who prescribed the highest dose. What is his or her name?
SQL query:
SELECT T1.name AS "physician name", T2.dose AS "prescribes dose" 
 FROM physician AS T1 JOIN prescribes AS T2 ON T1.employeeid = T2.physician ORDER BY T2.dose DESC
Result:
,physician name,prescribes dose
0,John Dorian,5

Answer: John Dorian prescribes a dose of 5
Table: Bookings, Drama_Workshop_Groups
Question: What are the names of the workshop groups that have bookings with status code "stop"?
SQL query:
SELECT T2.Store_Name AS "Drama_Workshop_Groups Store_Name", T1.Status_Code AS "Bookings Status_Code" 
 FROM Bookings AS T1 JOIN Drama_Workshop_Groups AS T2 ON T1.Workshop_Group_ID = T2.Workshop_Group_ID 
 WHERE T1.Status_Code = 'stop'
Result:
,Bookings Status_Code,Drama_Workshop_Groups Store_Name
0,stop,Bednar Film

Answer: The name of the workshop group is Bednar Film
Table: Songs
Question: Count the number of songs.
SQL query:
SELECT COUNT(*) AS "count of Songs" 
 FROM Songs
Result:
,count of Songs
0,0

Answer: The number of songs is 0.
Table: CLASS
Question: List the codes of all courses that take place in room KLR209.
SQL query:
SELECT class_code, class_room 
 FROM CLASS 
 WHERE class_room = 'KLR209'
Result:
,CLASS_CODE,CLASS_ROOM
0,10017,KLR209

Answer: The class with code 10017 takes place in room KLR209.
Table: authors
Question: Find the last name of the author with first name "Amal".
SQL query:
SELECT lname, fname 
 FROM authors 
 WHERE fname = 'Amal'
Result:
,fname,lname
0,Amal,Ahmed

Answer: The first name is Amal and the last name is Ahmed.
Table: addresses
Question: Count the number of cities in the state of Colorado.
SQL query:
SELECT COUNT(*) AS "count of addresses", state_province_county 
 FROM addresses 
 WHERE state_province_county = 'Colorado'
Result:
,count of addresses,state_province_county
0,1,Colorado

Answer: The is 1 city in the state of Colorado
Table: Flight
Question: Which origin has most number of flights?
SQL query:
SELECT origin 
 FROM Flight 
 GROUP BY origin ORDER BY COUNT(*) DESC
Result:
,origin
0,Los Angeles

Answer: Los Angeles has the most number of flights.
Table: exhibition
Question: What are the theme and year for all exhibitions that have a ticket price under 15?
SQL query:
SELECT theme, YEAR, ticket_price 
 FROM exhibition 
 WHERE ticket_price < 15
Result:
,Year,Theme,Ticket_Price
0,2006,Santa Claus and Rudolph the Red-Nosed Reindeer,14.95

Answer: The theme of the exhibition was Santa Claus and Rudolph the Red-Nosed Reindeer, it was held in 2006 and the ticket price was 2006.
Table: CUSTOMER
Question: How many customers have email that contains "gmail.com"?
SQL query:
SELECT COUNT(*) AS "count of CUSTOMER", Email 
 FROM CUSTOMER 
 WHERE Email LIKE '%gmail.com%'
Result:
,Email,count of CUSTOMER
0,ftremblay@gmail.com,8

Answer: There are 8 customers
Table: match_season, team
Question: Show the positions of the players from the team with name "Ryley Goldner".
SQL query:
SELECT T1.Position AS "match_season Position", T2.Name AS "team Name" 
 FROM match_season AS T1 JOIN team AS T2 ON T1.Team = T2.Team_id 
 WHERE T2.Name = 'Ryley Goldner'
Result:
,team Name,match_season Position
0,Ryley Goldner,Midfielder

Answer: The player Ryley Goldner plays the midfielder position.