MikeXydas/qr2t_benchmark huggingface dataset:
Table: races, results
Question: What are the maximum fastest lap speed in races held after 2004 grouped by race name and ordered by year?
SQL query:
SELECT MAX(T2.fastestlapspeed) AS "maximum fastestlapspeed", T1.name AS "races name", T1.year AS "races 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
Result:
,races name,races year,maximum fastestlapspeed
0,European Grand Prix,2016,202.946

Answer: The European Grand Prix race, held in 2016, had a maximum fastest lap speed of 202.946.
Table: employees
Question: display all the information of employees whose salary is in the range of 8000 and 12000 and commission is not null or department number does not equal to 40.
SQL query:
SELECT * 
 FROM employees 
 WHERE salary BETWEEN 8000 AND 12000 AND commission_pct <> 'null' OR department_id <> 40
Result:
,EMAIL,JOB_ID,SALARY,HIRE_DATE,LAST_NAME,FIRST_NAME,MANAGER_ID,EMPLOYEE_ID,PHONE_NUMBER,DEPARTMENT_ID,COMMISSION_PCT
0,SKING,AD_PRES,24000,1987-06-17,King,Steven,0,100,515.123.4567,90,0

Answer: Steven King was hired in 1987-06-17 with a salary of 24000. His job, manager, and employee ids are AD_PRES, 0, and 100, respectively. The employee stays in department 90 with phone number 515.123.4567. He can be contacted on the email SKING.
Table: GENRE, TRACK
Question: What is the average unit price of tracks that belong to Jazz genre?
SQL query:
SELECT AVG(UnitPrice) AS "average UnitPrice", T1.Name AS "GENRE Name" 
 FROM GENRE AS T1 JOIN TRACK AS T2 ON T1.GenreId = T2.GenreId 
 WHERE T1.Name = 'Jazz'
Result:
,GENRE Name,average UnitPrice
0,Jazz,0.9899999999999978

Answer: The average unit price of jazz tracks is 0.9899999999999978
Table: game
Question: How many games are held after season 2007?
SQL query:
SELECT COUNT(*) AS "count of game", season 
 FROM game 
 WHERE season > 2007
Result:
,Season,count of game
0,2008,17

Answer: The count of games held the season 2008 is 17
Table: Ref_budget_codes
Question: How many budget types do we have?
SQL query:
SELECT COUNT(*) AS "count of Ref_budget_codes" 
 FROM Ref_budget_codes
Result:
,count of Ref_budget_codes
0,3

Answer: There are 3 budget types.
Table: manufacturers
Question: Who is the founder of Sony?
SQL query:
SELECT founder, name 
 FROM manufacturers 
 WHERE name = 'Sony'
Result:
,Name,Founder
0,Sony,Andy

Answer: The founder of the manufacturer named Sony is Andy.
Table: county
Question: Return the maximum and minimum population among all counties.
SQL query:
SELECT MAX(Population) AS "maximum Population", MIN(Population) AS "minimum Population" 
 FROM county
Result:
,maximum Population,minimum Population
0,90000.0,13300.0

Answer: The maximum population of all counties is 90000 and the minimum is 13300
Table: CLASS, enroll, student
Question: What are the first names of all students in course ACCT-211?
SQL query:
SELECT T3.stu_fname AS "student stu_fname", T1.crs_code AS "CLASS crs_code" 
 FROM CLASS AS T1 JOIN enroll AS T2 ON T1.class_code = T2.class_code JOIN student AS T3 ON T2.stu_num = T3.stu_num 
 WHERE T1.crs_code = 'ACCT-211'
Result:
,CLASS crs_code,student stu_fname
0,ACCT-211,William

Answer: The student William is in course ACCT-211.
Table: Student
Question: List all students' first names and last names who majored in 600.
SQL query:
SELECT Fname, Lname, Major 
 FROM Student 
 WHERE Major = 600
Result:
,Fname,LName,Major
0,Linda,Smith,600

Answer: Linda Smith majored in 600
Table: airport
Question: What are the maximum and minimum number of transit passengers of all aiports.
SQL query:
SELECT MAX(Transit_Passengers) AS "maximum Transit_Passengers", MIN(Transit_Passengers) AS "minimum Transit_Passengers" 
 FROM airport
Result:
,maximum Transit_Passengers,minimum Transit_Passengers
0,156246.0,4395.0

Answer: The maximum number of transit passengers is 156246 while the minimum is 4395.
Table: Apartment_Buildings
Question: What are the address and phone number of the buildings managed by "Brenden"?
SQL query:
SELECT building_address, building_phone, building_manager 
 FROM Apartment_Buildings 
 WHERE building_manager = 'Brenden'
Result:
,building_phone,building_address,building_manager
0,915-617-2408x832,"354 Otto Villages
Charliefort, VT 71664",Brenden

Answer: The building manager Brenden manages the building with phone 915-617-2408x832 and address 354 Otto Villages Charliefort, VT 71664.
Table: artist
Question: How many artists are above age 46 and joined after 1990?
SQL query:
SELECT COUNT(*) AS "count of artist", age, year_join 
 FROM artist 
 WHERE age > 46 AND year_join > 1990
Result:
,Age,Year_Join,count of artist
0,47,1993,3

Answer: There are 3 artists above age 46 that joined after 1990.
Table: addresses
Question: Find the state and country of all cities with post code starting with 4.
SQL query:
SELECT state_province_county, country, zip_postcode 
 FROM addresses 
 WHERE zip_postcode LIKE '4%'
Result:
,country,zip_postcode,state_province_county
0,USA,416,Colorado

Answer: The Colorado state of the USA country has the post code 416.
Table: district
Question: What are the names of all districts with a city area greater than 10 or have more than 100000 people living there?
SQL query:
SELECT district_name, City_Population, city_area 
 FROM district 
 WHERE city_area > 10 OR City_Population > 100000
Result:
,City_Area,District_name,City_Population
0,20.0,Attock District,94620.0

Answer: The Attock District is in city area 20 and has a population of 94620.
Table: Staff
Question: When did the staff member with first name as Janessa and last name as Sawayn leave the company?
SQL query:
SELECT date_left_staff, last_name, first_name 
 FROM Staff 
 WHERE first_name = 'Janessa' AND last_name = 'Sawayn'
Result:
,last_name,first_name,date_left_staff
0,Sawayn,Janessa,2018-03-23 22:53:12

Answer: Janessa Sawayn left the company at 2018-03-23 22:53:12
Table: STUDENT
Question: Find the number of students in total.
SQL query:
SELECT COUNT(*) AS "count of STUDENT" 
 FROM STUDENT
Result:
,count of STUDENT
0,34

Answer: There are 34 students in total
Table: university, basketball_match
Question: Find the location and all games score of the school that has Clemson as its team name.
SQL query:
SELECT t2.All_Games AS "basketball_match All_Games", t1.location AS "university location", team_name 
 FROM university AS t1 JOIN basketball_match AS t2 ON t1.school_id = t2.school_id 
 WHERE team_name = 'Clemson'
Result:
,Team_Name,university location,basketball_match All_Games
0,Clemson,"New Brunswick, NJ",24–10

Answer: The team named Clemson is in the university that is located in New Brunswick, NJ and has scored 24-10 in all games.
Table: EVENTS, Services
Question: what are the event details of the services that have the type code 'Marriage'?
SQL query:
SELECT T1.event_details AS "EVENTS event_details", T2.Service_Type_Code AS "Services Service_Type_Code" 
 FROM EVENTS AS T1 JOIN Services AS T2 ON T1.Service_ID = T2.Service_ID 
 WHERE T2.Service_Type_Code = 'Marriage'
Result:
,EVENTS event_details,Services Service_Type_Code
0,Fail,Marriage

Answer: The service with type code "Marriage" has the event detail "Fail"
Table: people
Question: find the names of people who are taller than 200 or lower than 190.
SQL query:
SELECT name, height 
 FROM people 
 WHERE height > 200 OR height < 190
Result:
,Name,Height
0,Hubert Henno,188.0

Answer: Hubert Henno's height is 188.
Table: EMPLOYEE
Question: What are the birth dates of employees living in Edmonton?
SQL query:
SELECT BirthDate, City 
 FROM EMPLOYEE 
 WHERE City = 'Edmonton'
Result:
,City,BirthDate
0,Edmonton,1962-02-18 00:00:00

Answer: The employee that lives in Edmonton has birthdate 1962-02-18 00:00:00.
Table: customers
Question: Find the IDs of customers whose name contains "Diana".
SQL query:
SELECT customer_id, customer_name 
 FROM customers 
 WHERE customer_name LIKE '%Diana%'
Result:
,Customer_ID,Customer_name
0,562,Dr. Diana Rath

Answer: The customer Dr. Diana Rath has ID 562.
Table: Sportsinfo, Student
Question: Show total hours per week and number of games played for student David Shieber.
SQL query:
SELECT SUM(hoursperweek) AS "sum of hoursperweek", SUM(gamesplayed) AS "sum of gamesplayed", T2.Fname AS "Student Fname", T2.Lname AS "Student Lname" 
 FROM Sportsinfo AS T1 JOIN Student AS T2 ON T1.StuID = T2.StuID 
 WHERE T2.Fname = 'David' AND T2.Lname = 'Shieber'
Result:
,Student Fname,Student Lname,sum of gamesplayed,sum of hoursperweek
0,David,Shieber,64,15

Answer: David Shieber has played 64 games, with a total of 15 hours per week.
Table: student
Question: Find the first name of students living in city PHL whose age is between 20 and 25.
SQL query:
SELECT fname, age, city_code 
 FROM student 
 WHERE city_code = 'PHL' AND age BETWEEN 20 AND 25
Result:
,Age,Fname,city_code
0,22,David,PHL

Answer: David is 22 and lives in city PHL
Table: player_coach, coach, player
Question: Show the names of players coached by the rank 1 coach.
SQL query:
SELECT T3.Player_name AS "player Player_name", T2.Rank AS "coach Rank" 
 FROM player_coach AS T1 JOIN coach AS T2 ON T1.Coach_ID = T2.Coach_ID JOIN player AS T3 ON T1.Player_ID = T3.Player_ID 
 WHERE T2.Rank = 1
Result:
,coach Rank,player Player_name
0,1,Jean Luc Bouché

Answer: The player Jean Luc Bouché is coached by a rank 1 coach.
Table: perpetrator
Question: What is the average number of people injured by all perpetrators?
SQL query:
SELECT AVG(Injured) AS "average Injured" 
 FROM perpetrator
Result:
,average Injured
0,27.2

Answer: The average number of injured people by all perpetrators is 27.2.
Table: gymnast, people
Question: What is the total point count of the youngest gymnast?
SQL query:
SELECT T1.Total_Points AS "gymnast Total_Points", T2.Age AS "people Age" 
 FROM gymnast AS T1 JOIN people AS T2 ON T1.Gymnast_ID = T2.People_ID ORDER BY T2.Age ASC
Result:
,people Age,gymnast Total_Points
0,20.0,57.649

Answer: The age of the youngest gymnast is 20 and the total point count is 57.649
Table: artist, song
Question: What is the name and country of origin of the artist who released a song that has "love" in its title?
SQL query:
SELECT T1.artist_name AS "artist artist_name", T1.country AS "artist country", T2.song_name AS "song song_name" 
 FROM artist AS T1 JOIN song AS T2 ON T1.artist_name = T2.artist_name 
 WHERE T2.song_name LIKE '%love%'
Result:
,artist country,song song_name,artist artist_name
0,USA,My love,Enrique

Answer: Enrique who sings "My love" is from USA.
Table: user_profiles
Question: How many users are there?
SQL query:
SELECT COUNT(*) AS "count of user_profiles" 
 FROM user_profiles
Result:
,count of user_profiles
0,7

Answer: There are 7 user profiles
Table: country
Question: Count the number of countries.
SQL query:
SELECT COUNT(*) AS "count of country" 
 FROM country
Result:
,count of country
0,6

Answer: There are 6 countries.
Table: climber
Question: Return the maximum number of points for climbers from the United Kingdom.
SQL query:
SELECT MAX(Points) AS "maximum Points", Country 
 FROM climber 
 WHERE Country = 'United Kingdom'
Result:
,Country,maximum Points
0,United Kingdom,3.0

Answer: The maximum number of points for climbers from the United Kingdom is 3
Table: player, tryout
Question: What are the names and hours spent practicing of every student who received a yes at tryouts?
SQL query:
SELECT T1.pName AS "player pName", T1.HS AS "player HS", T2.decision AS "tryout decision" 
 FROM player AS T1 JOIN tryout AS T2 ON T1.pID = T2.pID 
 WHERE T2.decision = 'yes'
Result:
,player HS,player pName,tryout decision
0,1200,Andrew,yes

Answer: The name of the student who received a yes at tryouts is Andrew and the number of hours spent practicing is 1200
Table: player, tryout
Question: What are the names of all students who tried out in alphabetical order?
SQL query:
SELECT T1.pName AS "player pName" 
 FROM player AS T1 JOIN tryout AS T2 ON T1.pID = T2.pID ORDER BY T1.pName
Result:
,player pName
0,Andrew

Answer: The player name is Andrew.
Table: races, results
Question: What are the average fastest lap speed in races held after 2004 grouped by race name and ordered by year?
SQL query:
SELECT AVG(T2.fastestlapspeed) AS "average fastestlapspeed", T1.name AS "races name", T1.year AS "races 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
Result:
,races name,races year,average fastestlapspeed
0,Abu Dhabi Grand Prix,2015,184.10512903225808

Answer: The race Abu Dhabi Grand Prix in 2015 had average fastest lap speed 184.10512903225808.
Table: Customer_Payments, Customers
Question: How much in total does customer with first name as Carole and last name as Bernhard paid?
SQL query:
SELECT SUM(T1.amount_payment) AS "sum of amount_payment", T2.last_name AS "Customers last_name", T2.first_name AS "Customers first_name" 
 FROM Customer_Payments AS T1 JOIN Customers AS T2 ON T1.customer_id = T2.customer_id 
 WHERE T2.first_name = 'Carole' AND T2.last_name = 'Bernhard'
Result:
,Customers last_name,Customers first_name,sum of amount_payment
0,Bernhard,Carole,9886.62

Answer: The customer with first name as Carole and last name as Bernhard paid 9886.62
Table: musical
Question: Return the names of musicals who have the nominee Bob Fosse.
SQL query:
SELECT Name, Nominee 
 FROM musical 
 WHERE Nominee = 'Bob Fosse'
Result:
,Name,Nominee
0,The Phantom of the Opera,Bob Fosse

Answer: The Phantom of the Opera has Bob Fosse as a nominee.
Table: postseason, team
Question: What are the maximum scores the team Boston Red Stockings got when the team won in postseason?
SQL query:
SELECT MAX(T1.wins) AS "maximum wins", T2.name AS "team name" 
 FROM postseason AS T1 JOIN team AS T2 ON T1.team_id_winner = T2.team_id_br 
 WHERE T2.name = 'Boston Red Stockings'
Result:
,team name,maximum wins
0,Boston Red Stockings,5

Answer: The team Boston Red Stockings had 5 maximum wins.
Table: Catalog_Contents
Question: Find the name and capacity of products with price greater than 700 (in USD).
SQL query:
SELECT catalog_entry_name, capacity, price_in_dollars 
 FROM Catalog_Contents 
 WHERE price_in_dollars > 700
Result:
,capacity,price_in_dollars,catalog_entry_name
0,6,745.02,Vimto

Answer: The product Vimto costs 745.02 dollars and has capacity of 6.
Table: student
Question: What is the name of the deparment with the highest enrollment?
SQL query:
SELECT dept_name 
 FROM student 
 GROUP BY dept_name ORDER BY COUNT(*) DESC
Result:
,dept_name
0,Civil Eng.

Answer: The department with the highest enrollment is Civil Eng.
Table: departments
Question: display all the information about the department Marketing.
SQL query:
SELECT * 
 FROM departments 
 WHERE department_name = 'Marketing'
Result:
,MANAGER_ID,LOCATION_ID,DEPARTMENT_ID,DEPARTMENT_NAME
0,201,1800,20,Marketing

Answer: The marketing department has a manager id equal to 201, a location id equal to 1800 and a department id equal to 20
Table: mountain
Question: What are the countries of mountains with height bigger than 5000?
SQL query:
SELECT Country, Height 
 FROM mountain 
 WHERE Height > 5000
Result:
,Height,Country
0,5895.0,Tanzania

Answer: The mountain in the country of Tanzania has height 5895.
Table: swimmer
Question: Find all 200 meter and 300 meter results of swimmers with nationality "Australia".
SQL query:
SELECT meter_200, meter_300, nationality 
 FROM swimmer 
 WHERE nationality = 'Australia'
Result:
,meter_200,meter_300,Nationality
0,1:56.34,2:55.90,Australia

Answer: For Australia the 200 meter result was 1:56.34 and the 300 meter was 2:55.90.
Table: catalog_contents
Question: How many products are there in the records?
SQL query:
SELECT COUNT(*) AS "count of catalog_contents" 
 FROM catalog_contents
Result:
,count of catalog_contents
0,15

Answer: There are 15 products in the records.
Table: staff
Question: What are the last names of staff with email addressed containing the substring "wrau"?
SQL query:
SELECT last_name, email_address 
 FROM staff 
 WHERE email_address LIKE '%wrau%'
Result:
,last_name,email_address
0,Erdman,wrau@example.com

Answer: The staff with last name Erdman has the email address wrau@example.com.
Table: authors
Question: What is the first name of the author with last name "Ueno"?
SQL query:
SELECT fname, lname 
 FROM authors 
 WHERE lname = 'Ueno'
Result:
,fname,lname
0,Katsuhiro,Ueno

Answer: The first name is Katsuhiro and the last name is Ueno
Table: ORDER_ITEMS, Products
Question: Compute the total order quantities of the product "photo".
SQL query:
SELECT SUM(T1.Order_Quantity) AS "sum of Order_Quantity", T2.Product_Name AS "Products Product_Name" 
 FROM ORDER_ITEMS AS T1 JOIN Products AS T2 ON T1.Product_ID = T2.Product_ID 
 WHERE T2.Product_Name = 'photo'
Result:
,Products Product_Name,sum of Order_Quantity
0,photo,3

Answer: There are 3 orders of the product photo.
Table: Accounts
Question: Count the number of accounts.
SQL query:
SELECT COUNT(*) AS "count of Accounts" 
 FROM Accounts
Result:
,count of Accounts
0,15

Answer: There are 15 accounts.
Table: Apartments
Question: What are the apartment number and the room count of each apartment?
SQL query:
SELECT apt_number, room_count 
 FROM Apartments
Result:
,apt_number,room_count
0,Suite 645,7

Answer: The apartment Suite 645 has 7 rooms
Table: entrepreneur, people
Question: What is the total money requested by entrepreneurs with height more than 1.85?
SQL query:
SELECT SUM(T1.Money_Requested) AS "sum of Money_Requested", T2.Height AS "people Height" 
 FROM entrepreneur AS T1 JOIN people AS T2 ON T1.People_ID = T2.People_ID 
 WHERE T2.Height > 1.85
Result:
,people Height,sum of Money_Requested
0,1.9,380000.0

Answer: Entrepreneurs with height 1.9 have requested a total of 380000 money.
Table: WINE
Question: Give the average price and case of wines made from Zinfandel grapes in the year 2009.
SQL query:
SELECT AVG(Price) AS "average Price", AVG(Cases) AS "average Cases", Grape, YEAR 
 FROM WINE 
 WHERE YEAR = 2009 AND Grape = 'Zinfandel'
Result:
,Year,Grape,average Cases,average Price
0,2009,Zinfandel,15000.0,18.0

Answer: The Zinfandel grapes had 15000 average cases and an average price of 18 for the year of 2009.
Table: Attribute_Definitions
Question: What is the attribute data type of the attribute with name "Green"?
SQL query:
SELECT attribute_data_type, attribute_name 
 FROM Attribute_Definitions 
 WHERE attribute_name = 'Green'
Result:
,attribute_name,attribute_data_type
0,Green,Bool

Answer: The attribute with name "Green" has Bool as an attribute data type
Table: Student
Question: Show first name and last name for all students.
SQL query:
SELECT Fname, Lname 
 FROM Student
Result:
,Fname,LName
0,Linda,Smith

Answer: The student is Linda Smith.
Table: Employees, ROLES
Question: Show the names of employees with role name Editor.
SQL query:
SELECT T1.employee_name AS "Employees employee_name", T2.role_name AS "ROLES role_name" 
 FROM Employees AS T1 JOIN ROLES AS T2 ON T1.role_code = T2.role_code 
 WHERE T2.role_name = 'Editor'
Result:
,ROLES role_name,Employees employee_name
0,Editor,Stephanie

Answer: The name of employee with role name Editor is Stephanie
Table: Course_Authors_and_Tutors
Question: What are the addresses of the course authors or tutors with personal name "Cathrine"
SQL query:
SELECT address_line_1, personal_name 
 FROM Course_Authors_and_Tutors 
 WHERE personal_name = 'Cathrine'
Result:
,personal_name,address_line_1
0,Cathrine,"756 Monahan Mews
Spinkashire, NJ 64230-5098"

Answer: The address of the course author or tutor Cathrine is 756 Monahan Mews Spinkashire, NJ 64230-5098.
Table: Lessons, Staff
Question: What is average lesson price taught by staff with first name as Janessa and last name as Sawayn?
SQL query:
SELECT AVG(price) AS "average price", T2.last_name AS "Staff last_name", T2.first_name AS "Staff first_name" 
 FROM Lessons AS T1 JOIN Staff AS T2 ON T1.staff_id = T2.staff_id 
 WHERE T2.first_name = 'Janessa' AND T2.last_name = 'Sawayn'
Result:
,average price,Staff last_name,Staff first_name
0,306.0,Sawayn,Janessa

Answer: The staff Janessa Sawayn has an average price of 306.
Table: Player
Question: How many different players trained for more than 1000 hours?
SQL query:
SELECT COUNT(*) AS "count of Player", HS 
 FROM Player 
 WHERE HS > 1000
Result:
,HS,count of Player
0,1200,4

Answer: There are 4 players who have played 1200 hours
Table: submission
Question: For each submission, show the author and their affiliated college.
SQL query:
SELECT Author, College 
 FROM submission
Result:
,Author,College
0,Steve Niehaus,Notre Dame

Answer: The author Steve Niehaus went to the Notre Dame college.
Table: member
Question: Show the different countries and the number of members from each.
SQL query:
SELECT Country, COUNT(*) AS "count of member" 
 FROM member 
 GROUP BY Country
Result:
,Country,count of member
0,Canada,4

Answer: 4 members are from Canada
Table: mill
Question: What are the names of the mills which are not located in 'Donceel'?
SQL query:
SELECT name, LOCATION 
 FROM mill 
 WHERE LOCATION <> 'Donceel'
Result:
,name,location
0,Le Vieux Molen,Coswarem

Answer: The mill Le Vieux Molen was located in Coswarem.
Table: body_builder, people
Question: What are the names of body builders?
SQL query:
SELECT T2.Name AS "people Name" 
 FROM body_builder AS T1 JOIN people AS T2 ON T1.People_ID = T2.People_ID
Result:
,people Name
0,Jack Campbell

Answer: The name of body builder is Jack Campbell
Table: ship
Question: Show the name of ships whose nationality is either United States or United Kingdom.
SQL query:
SELECT Name, Nationality 
 FROM ship 
 WHERE Nationality = 'United States' OR Nationality = 'United Kingdom'
Result:
,Name,Nationality
0,Corbridge,United Kingdom

Answer: The ship named Corbridge is from United Kingdom
Table: book
Question: What are the title and issues of the books?
SQL query:
SELECT Title, Issues 
 FROM book
Result:
,Title,Issues
0,The Black Lamb,6.0

Answer: The book titled The Black Lamb had 6 issues.
Table: employees
Question: Display the first and last name, and salary for those employees whose first name is ending with the letter m.
SQL query:
SELECT first_name, last_name, salary 
 FROM employees 
 WHERE first_name LIKE '%m'
Result:
,SALARY,LAST_NAME,FIRST_NAME
0,8200,Fripp,Adam

Answer: The employee Fripp Adam has a salary of 8200.
Table: stock, device, shop
Question: What are the names of device shops, and what are the carriers that they carry devices in stock for?
SQL query:
SELECT T3.Shop_Name AS "shop Shop_Name", T2.Carrier AS "device Carrier" 
 FROM stock AS T1 JOIN device AS T2 ON T1.Device_ID = T2.Device_ID JOIN shop AS T3 ON T1.Shop_ID = T3.Shop_ID
Result:
,device Carrier,shop Shop_Name
0,Bell Mobility,Dinas Device

Answer: The device carrier Bell Mobility had a shop named Dinas Device.
Table: Faculty
Question: How many faculty members do we have for each rank and gender?
SQL query:
SELECT rank, sex, COUNT(*) AS "count of Faculty" 
 FROM Faculty 
 GROUP BY rank, sex
Result:
,Sex,Rank,count of Faculty
0,F,AssocProf,1

Answer: For the gender F and the rank AssocProf the number of faculty members is 1
Table: city, temperature
Question: Give me the temperature of Shanghai in January.
SQL query:
SELECT T2.Jan AS "temperature Jan", T1.city AS "city city" 
 FROM city AS T1 JOIN temperature AS T2 ON T1.city_id = T2.city_id 
 WHERE T1.city = 'Shanghai'
Result:
,city city,temperature Jan
0,Shanghai,17.8

Answer: Shanghai's temperature on January is 17.8.
Table: All_documents, Ref_document_types
Question: Find the document type name of the document named "How to read a book".
SQL query:
SELECT T2.document_type_name AS "Ref_document_types document_type_name", T1.document_name AS "All_documents document_name" 
 FROM All_documents AS T1 JOIN Ref_document_types AS T2 ON T1.document_type_code = T2.document_type_code 
 WHERE T1.document_name = 'How to read a book'
Result:
,All_documents document_name,Ref_document_types document_type_name
0,How to read a book,Book

Answer: The document named "How to read a book" is of type book.
Table: accounts, checking, savings
Question: Find the name of accounts whose checking balance is higher than corresponding saving balance.
SQL query:
SELECT T1.name AS "accounts name" 
 FROM accounts AS T1 JOIN checking AS T2 ON T1.custid = T2.custid JOIN savings AS T3 ON T1.custid = T3.custid 
 WHERE T2.balance > T3.balance
Result:
,accounts name
0,Weeks

Answer: The account's name is Weeks.