minktn/spider-data huggingface dataset:
Database: soccer_1
Question: What are the names of players who have the best dribbling?
SQL: SELECT DISTINCT T1.player_name FROM Player AS T1 JOIN Player_Attributes AS T2 ON T1.player_api_id = T2.player_api_id WHERE T2.dribbling  =  ( SELECT max(overall_rating) FROM Player_Attributes)
Database: soccer_1
Question: List the names of all players who have a crossing score higher than 90 and prefer their right foot.
SQL: SELECT DISTINCT T1.player_name FROM Player AS T1 JOIN Player_Attributes AS T2 ON T1.player_api_id = T2.player_api_id WHERE T2.crossing  >  90 AND T2.preferred_foot  =  "right"
Database: soccer_1
Question: List the names of all left-footed players who have overall rating between 85 and 90.
SQL: SELECT DISTINCT T1.player_name FROM Player AS T1 JOIN Player_Attributes AS T2 ON T1.player_api_id = T2.player_api_id WHERE T2.preferred_foot  =  "left" AND T2.overall_rating  >=  85 AND T2.overall_rating  <=  90
Database: soccer_1
Question: What is the average rating for right-footed players and left-footed players?
SQL: SELECT preferred_foot ,  avg(overall_rating) FROM Player_Attributes GROUP BY preferred_foot
Database: soccer_1
Question: Of all players with an overall rating greater than 80, how many are right-footed and left-footed?
SQL: SELECT preferred_foot ,  count(*) FROM Player_Attributes WHERE overall_rating  >  80 GROUP BY preferred_foot
Database: soccer_1
Question: List all of the player ids with a height of at least 180cm and an overall rating higher than 85.
SQL: SELECT player_api_id FROM Player WHERE height  >=  180 INTERSECT SELECT player_api_id FROM Player_Attributes WHERE overall_rating  >  85
Database: soccer_1
Question: List all of the ids for left-footed players with a height between 180cm and 190cm.
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"
Database: soccer_1
Question: Who are the top 3 players in terms of overall rating?
SQL: SELECT DISTINCT T1.player_name FROM Player AS T1 JOIN Player_Attributes AS T2 ON T1.player_api_id  =  T2.player_api_id ORDER BY overall_rating DESC LIMIT 3
Database: soccer_1
Question: List the names and birthdays of the top five players in terms of potential.
SQL: SELECT DISTINCT T1.player_name ,  T1.birthday FROM Player AS T1 JOIN Player_Attributes AS T2 ON T1.player_api_id  =  T2.player_api_id ORDER BY potential DESC LIMIT 5
Database: performance_attendance
Question: How many performances are there?
SQL: SELECT count(*) FROM performance
Database: performance_attendance
Question: List the hosts of performances in ascending order of attendance.
SQL: SELECT HOST FROM performance ORDER BY Attendance ASC
Database: performance_attendance
Question: What are the dates and locations of performances?
SQL: SELECT Date ,  LOCATION FROM performance
Database: performance_attendance
Question: Show the attendances of the performances at location "TD Garden" or "Bell Centre"
SQL: SELECT Attendance FROM performance WHERE LOCATION  =  "TD Garden" OR LOCATION  =  "Bell Centre"
Database: performance_attendance
Question: What is the average number of attendees for performances?
SQL: SELECT avg(Attendance) FROM performance
Database: performance_attendance
Question: What is the date of the performance with the highest number of attendees?
SQL: SELECT Date FROM performance ORDER BY Attendance DESC LIMIT 1
Database: performance_attendance
Question: Show different locations and the number of performances at each location.
SQL: SELECT LOCATION ,  COUNT(*) FROM performance GROUP BY LOCATION
Database: performance_attendance
Question: Show the most common location of performances.
SQL: SELECT LOCATION FROM performance GROUP BY LOCATION ORDER BY COUNT(*) DESC LIMIT 1
Database: performance_attendance
Question: Show the locations that have at least two performances.
SQL: SELECT LOCATION FROM performance GROUP BY LOCATION HAVING COUNT(*)  >=  2
Database: performance_attendance
Question: Show the locations that have both performances with more than 2000 attendees and performances with less than 1000 attendees.
SQL: SELECT LOCATION FROM performance WHERE Attendance  >  2000 INTERSECT SELECT LOCATION FROM performance WHERE Attendance  <  1000
Database: performance_attendance
Question: Show the names of members and the location of the performances they attended.
SQL: SELECT T2.Name ,  T3.Location FROM member_attendance AS T1 JOIN member AS T2 ON T1.Member_ID  =  T2.Member_ID JOIN performance AS T3 ON T1.Performance_ID  =  T3.Performance_ID
Database: performance_attendance
Question: Show the names of members and the location of performances they attended in ascending alphabetical order of their names.
SQL: SELECT T2.Name ,  T3.Location FROM member_attendance AS T1 JOIN member AS T2 ON T1.Member_ID  =  T2.Member_ID JOIN performance AS T3 ON T1.Performance_ID  =  T3.Performance_ID ORDER BY T2.Name ASC
Database: performance_attendance
Question: Show the dates of performances with attending members whose roles are "Violin".
SQL: SELECT T3.Date FROM member_attendance AS T1 JOIN member AS T2 ON T1.Member_ID  =  T2.Member_ID JOIN performance AS T3 ON T1.Performance_ID  =  T3.Performance_ID WHERE T2.Role  =  "Violin"
Database: performance_attendance
Question: Show the names of members and the dates of performances they attended in descending order of attendance of the performances.
SQL: SELECT T2.Name ,  T3.Date FROM member_attendance AS T1 JOIN member AS T2 ON T1.Member_ID  =  T2.Member_ID JOIN performance AS T3 ON T1.Performance_ID  =  T3.Performance_ID ORDER BY T3.Attendance DESC
Database: performance_attendance
Question: List the names of members who did not attend any performance.
SQL: SELECT Name FROM member WHERE Member_ID NOT IN (SELECT Member_ID FROM member_attendance)
Database: college_2
Question: Find the buildings which have rooms with capacity more than 50.
SQL: SELECT DISTINCT building FROM classroom WHERE capacity  >  50
Database: college_2
Question: What are the distinct buildings with capacities of greater than 50?
SQL: SELECT DISTINCT building FROM classroom WHERE capacity  >  50
Database: college_2
Question: Count the number of rooms that are not in the Lamberton building.
SQL: SELECT count(*) FROM classroom WHERE building != 'Lamberton'
Database: college_2
Question: How many classrooms are not in Lamberton?
SQL: SELECT count(*) FROM classroom WHERE building != 'Lamberton'
Database: college_2
Question: What is the name and building of the departments whose budget is more than the average budget?
SQL: SELECT dept_name ,  building FROM department WHERE budget  >  (SELECT avg(budget) FROM department)
Database: college_2
Question: Give the name and building of the departments with greater than average budget.
SQL: SELECT dept_name ,  building FROM department WHERE budget  >  (SELECT avg(budget) FROM department)
Database: college_2
Question: Find the room number of the rooms which can sit 50 to 100 students and their buildings.
SQL: SELECT building ,  room_number FROM classroom WHERE capacity BETWEEN 50 AND 100
Database: college_2
Question: What are the room numbers and corresponding buildings for classrooms which can seat between 50 to 100 students?
SQL: SELECT building ,  room_number FROM classroom WHERE capacity BETWEEN 50 AND 100
Database: college_2
Question: Find the name and building of the department with the highest budget.
SQL: SELECT dept_name ,  building FROM department ORDER BY budget DESC LIMIT 1
Database: college_2
Question: What is the department name and corresponding building for the department with the greatest budget?
SQL: SELECT dept_name ,  building FROM department ORDER BY budget DESC LIMIT 1
Database: college_2
Question: What is the name of the student who has the highest total credits in the History department.
SQL: SELECT name FROM student WHERE dept_name  =  'History' ORDER BY tot_cred DESC LIMIT 1
Database: college_2
Question: Give the name of the student in the History department with the most credits.
SQL: SELECT name FROM student WHERE dept_name  =  'History' ORDER BY tot_cred DESC LIMIT 1
Database: college_2
Question: How many rooms does the Lamberton building have?
SQL: SELECT count(*) FROM classroom WHERE building  =  'Lamberton'
Database: college_2
Question: Count the number of classrooms in Lamberton.
SQL: SELECT count(*) FROM classroom WHERE building  =  'Lamberton'
Database: college_2
Question: How many students have advisors?
SQL: SELECT count(DISTINCT s_id) FROM advisor
Database: college_2
Question: Count the number of students who have advisors.
SQL: SELECT count(DISTINCT s_id) FROM advisor
Database: college_2
Question: How many departments offer courses?
SQL: SELECT count(DISTINCT dept_name) FROM course
Database: college_2
Question: Count the number of departments which offer courses.
SQL: SELECT count(DISTINCT dept_name) FROM course
Database: college_2
Question: How many different courses offered by Physics department?
SQL: SELECT count(DISTINCT course_id) FROM course WHERE dept_name  =  'Physics'
Database: college_2
Question: Count the number of courses in the Physics department.
SQL: SELECT count(DISTINCT course_id) FROM course WHERE dept_name  =  'Physics'
Database: college_2
Question: Find the title of courses that have two prerequisites?
SQL: SELECT T1.title FROM course AS T1 JOIN prereq AS T2 ON T1.course_id  =  T2.course_id GROUP BY T2.course_id HAVING count(*)  =  2
Database: college_2
Question: What are the titles for courses with two prerequisites?
SQL: SELECT T1.title FROM course AS T1 JOIN prereq AS T2 ON T1.course_id  =  T2.course_id GROUP BY T2.course_id HAVING count(*)  =  2
Database: college_2
Question: Find the title, credit, and department name of courses that have more than one prerequisites?
SQL: SELECT T1.title ,  T1.credits , T1.dept_name FROM course AS T1 JOIN prereq AS T2 ON T1.course_id  =  T2.course_id GROUP BY T2.course_id HAVING count(*)  >  1
Database: college_2
Question: What is the title, credit value, and department name for courses with more than one prerequisite?
SQL: SELECT T1.title ,  T1.credits , T1.dept_name FROM course AS T1 JOIN prereq AS T2 ON T1.course_id  =  T2.course_id GROUP BY T2.course_id HAVING count(*)  >  1
Database: college_2
Question: How many courses that do not have prerequisite?
SQL: SELECT count(*) FROM course WHERE course_id NOT IN (SELECT course_id FROM prereq)
Database: college_2
Question: Count the number of courses without prerequisites.
SQL: SELECT count(*) FROM course WHERE course_id NOT IN (SELECT course_id FROM prereq)
Database: college_2
Question: Find the name of the courses that do not have any prerequisite?
SQL: SELECT title FROM course WHERE course_id NOT IN (SELECT course_id FROM prereq)
Database: college_2
Question: What are the titles of courses without prerequisites?
SQL: SELECT title FROM course WHERE course_id NOT IN (SELECT course_id FROM prereq)
Database: college_2
Question: How many different instructors have taught some course?
SQL: SELECT COUNT (DISTINCT id) FROM teaches
Database: college_2
Question: Count the number of distinct instructors who have taught a course.
SQL: SELECT COUNT (DISTINCT id) FROM teaches
Database: college_2
Question: Find the total budgets of the Marketing or Finance department.
SQL: SELECT sum(budget) FROM department WHERE dept_name  =  'Marketing' OR dept_name  =  'Finance'
Database: college_2
Question: What is the sum of budgets of the Marketing and Finance departments?
SQL: SELECT sum(budget) FROM department WHERE dept_name  =  'Marketing' OR dept_name  =  'Finance'
Database: college_2
Question: Find the department name of the instructor whose name contains 'Soisalon'.
SQL: SELECT dept_name FROM instructor WHERE name LIKE '%Soisalon%'
Database: college_2
Question: What is the name of the department with an instructure who has a name like 'Soisalon'?
SQL: SELECT dept_name FROM instructor WHERE name LIKE '%Soisalon%'
Database: college_2
Question: How many rooms whose capacity is less than 50 does the Lamberton building have?
SQL: SELECT count(*) FROM classroom WHERE building  =  'Lamberton' AND capacity  <  50
Database: college_2
Question: Count the number of rooms in Lamberton with capacity lower than 50.
SQL: SELECT count(*) FROM classroom WHERE building  =  'Lamberton' AND capacity  <  50
Database: college_2
Question: Find the name and budget of departments whose budgets are more than the average budget.
SQL: SELECT dept_name ,  budget FROM department WHERE budget  >  (SELECT avg(budget) FROM department)
Database: college_2
Question: What are the names and budgets of departments with budgets greater than the average?
SQL: SELECT dept_name ,  budget FROM department WHERE budget  >  (SELECT avg(budget) FROM department)
Database: college_2
Question: what is the name of the instructor who is in Statistics department and earns the lowest salary?
SQL: SELECT name FROM instructor WHERE dept_name  =  'Statistics' ORDER BY salary LIMIT 1
Database: college_2
Question: Give the name of the lowest earning instructor in the Statistics department.
SQL: SELECT name FROM instructor WHERE dept_name  =  'Statistics' ORDER BY salary LIMIT 1
Database: college_2
Question: Find the title of course that is provided by both Statistics and Psychology departments.
SQL: SELECT title FROM course WHERE dept_name  =  'Statistics' INTERSECT SELECT title FROM course WHERE dept_name  =  'Psychology'
Database: college_2
Question: What is the title of a course that is listed in both the Statistics and Psychology departments?
SQL: SELECT title FROM course WHERE dept_name  =  'Statistics' INTERSECT SELECT title FROM course WHERE dept_name  =  'Psychology'
Database: college_2
Question: Find the title of course that is provided by Statistics but not Psychology departments.
SQL: SELECT title FROM course WHERE dept_name  =  'Statistics' EXCEPT SELECT title FROM course WHERE dept_name  =  'Psychology'
Database: college_2
Question: What are the titles of courses that are in the Statistics department but not the Psychology department?
SQL: SELECT title FROM course WHERE dept_name  =  'Statistics' EXCEPT SELECT title FROM course WHERE dept_name  =  'Psychology'
Database: college_2
Question: Find the id of instructors who taught a class in Fall 2009 but not in Spring 2010.
SQL: SELECT id FROM teaches WHERE semester  =  'Fall' AND YEAR  =  2009 EXCEPT SELECT id FROM teaches WHERE semester  =  'Spring' AND YEAR  =  2010
Database: college_2
Question: What are the ids of instructors who taught in the Fall of 2009 but not in the Spring of 2010?
SQL: SELECT id FROM teaches WHERE semester  =  'Fall' AND YEAR  =  2009 EXCEPT SELECT id FROM teaches WHERE semester  =  'Spring' AND YEAR  =  2010
Database: college_2
Question: Find the name of students who took any class in the years of 2009 and 2010.
SQL: SELECT DISTINCT T1.name FROM student AS T1 JOIN takes AS T2 ON T1.id  =  T2.id WHERE YEAR  =  2009 OR YEAR  =  2010
Database: college_2
Question: What are the names of the students who took classes in 2009 or 2010?
SQL: SELECT DISTINCT T1.name FROM student AS T1 JOIN takes AS T2 ON T1.id  =  T2.id WHERE YEAR  =  2009 OR YEAR  =  2010
Database: college_2
Question: Find the names of the top 3 departments that provide the largest amount of courses?
SQL: SELECT dept_name FROM course GROUP BY dept_name ORDER BY count(*) DESC LIMIT 3
Database: college_2
Question: What are the names of the 3 departments with the most courses?
SQL: SELECT dept_name FROM course GROUP BY dept_name ORDER BY count(*) DESC LIMIT 3
Database: college_2
Question: Find the name of the department that offers the highest total credits?
SQL: SELECT dept_name FROM course GROUP BY dept_name ORDER BY sum(credits) DESC LIMIT 1
Database: college_2
Question: What is the name of the department with the most credits?
SQL: SELECT dept_name FROM course GROUP BY dept_name ORDER BY sum(credits) DESC LIMIT 1
Database: college_2
Question: List the names of all courses ordered by their titles and credits.
SQL: SELECT title FROM course ORDER BY title ,  credits
Database: college_2
Question: Given the titles of all courses, in order of titles and credits.
SQL: SELECT title FROM course ORDER BY title ,  credits
Database: college_2
Question: Which department has the lowest budget?
SQL: SELECT dept_name FROM department ORDER BY budget LIMIT 1
Database: college_2
Question: Give the name of the department with the lowest budget.
SQL: SELECT dept_name FROM department ORDER BY budget LIMIT 1
Database: college_2
Question: List the names and buildings of all departments sorted by the budget from large to small.
SQL: SELECT dept_name ,  building FROM department ORDER BY budget DESC
Database: college_2
Question: What are the names and buildings of the deparments, sorted by budget descending?
SQL: SELECT dept_name ,  building FROM department ORDER BY budget DESC
Database: college_2
Question: Who is the instructor with the highest salary?
SQL: SELECT name FROM instructor ORDER BY salary DESC LIMIT 1
Database: college_2
Question: Give the name of the highest paid instructor.
SQL: SELECT name FROM instructor ORDER BY salary DESC LIMIT 1
Database: college_2
Question: List the information of all instructors ordered by their salary in ascending order.
SQL: SELECT * FROM instructor ORDER BY salary
Database: college_2
Question: Give all information regarding instructors, in order of salary from least to greatest.
SQL: SELECT * FROM instructor ORDER BY salary
Database: college_2
Question: Find the name of the students and their department names sorted by their total credits in ascending order.
SQL: SELECT name ,  dept_name FROM student ORDER BY tot_cred
Database: college_2
Question: What are the names of students and their respective departments, ordered by number of credits from least to greatest?
SQL: SELECT name ,  dept_name FROM student ORDER BY tot_cred
Database: college_2
Question: list in alphabetic order all course names and their instructors' names in year 2008.
SQL: SELECT T1.title ,  T3.name FROM course AS T1 JOIN teaches AS T2 ON T1.course_id  =  T2.course_id JOIN instructor AS T3 ON T2.id  =  T3.id WHERE YEAR  =  2008 ORDER BY T1.title
Database: college_2
Question: Show all titles and their instructors' names for courses in 2008, in alphabetical order by title.
SQL: SELECT T1.title ,  T3.name FROM course AS T1 JOIN teaches AS T2 ON T1.course_id  =  T2.course_id JOIN instructor AS T3 ON T2.id  =  T3.id WHERE YEAR  =  2008 ORDER BY T1.title
Database: college_2
Question: Find the name of instructors who are advising more than one student.
SQL: SELECT T1.name FROM instructor AS T1 JOIN advisor AS T2 ON T1.id  =  T2.i_id GROUP BY T2.i_id HAVING count(*)  >  1
Database: college_2
Question: What are the names of instructors who advise more than one student?
SQL: SELECT T1.name FROM instructor AS T1 JOIN advisor AS T2 ON T1.id  =  T2.i_id GROUP BY T2.i_id HAVING count(*)  >  1
Database: college_2
Question: Find the name of the students who have more than one advisor?
SQL: SELECT T1.name FROM student AS T1 JOIN advisor AS T2 ON T1.id  =  T2.s_id GROUP BY T2.s_id HAVING count(*)  >  1
Database: college_2
Question: What are the names of students who have more than one advisor?
SQL: SELECT T1.name FROM student AS T1 JOIN advisor AS T2 ON T1.id  =  T2.s_id GROUP BY T2.s_id HAVING count(*)  >  1
Database: college_2
Question: Find the number of rooms with more than 50 capacity for each building.
SQL: SELECT count(*) ,  building FROM classroom WHERE capacity  >  50 GROUP BY building
Database: college_2
Question: How many rooms in each building have a capacity of over 50?
SQL: SELECT count(*) ,  building FROM classroom WHERE capacity  >  50 GROUP BY building
Database: college_2
Question: Find the maximum and average capacity among rooms in each building.
SQL: SELECT max(capacity) ,  avg(capacity) ,  building FROM classroom GROUP BY building
Database: college_2
Question: What are the greatest and average capacity for rooms in each building?
SQL: SELECT max(capacity) ,  avg(capacity) ,  building FROM classroom GROUP BY building
Database: college_2
Question: Find the title of the course that is offered by more than one department.
SQL: SELECT title FROM course GROUP BY title HAVING count(*)  >  1
Database: college_2
Question: What are the titles of courses that are offered in more than one department?
SQL: SELECT title FROM course GROUP BY title HAVING count(*)  >  1
Database: college_2
Question: Find the total credits of courses provided by different department.
SQL: SELECT sum(credits) ,  dept_name FROM course GROUP BY dept_name
Database: college_2
Question: How many total credits are offered by each department?
SQL: SELECT sum(credits) ,  dept_name FROM course GROUP BY dept_name
Database: college_2
Question: Find the minimum salary for the departments whose average salary is above the average payment of all instructors.
SQL: SELECT min(salary) ,  dept_name FROM instructor GROUP BY dept_name HAVING avg(salary)  >  (SELECT avg(salary) FROM instructor)
Database: college_2
Question: What is the lowest salary in departments with average salary greater than the overall average.
SQL: SELECT min(salary) ,  dept_name FROM instructor GROUP BY dept_name HAVING avg(salary)  >  (SELECT avg(salary) FROM instructor)
Database: college_2
Question: Find the number of courses provided in each semester and year.
SQL: SELECT count(*) ,  semester ,  YEAR FROM SECTION GROUP BY semester ,  YEAR
Database: college_2
Question: How many courses are provided in each semester and year?
SQL: SELECT count(*) ,  semester ,  YEAR FROM SECTION GROUP BY semester ,  YEAR
Database: college_2
Question: Find the year which offers the largest number of courses.
SQL: SELECT YEAR FROM SECTION GROUP BY YEAR ORDER BY count(*) DESC LIMIT 1
Database: college_2
Question: Which year had the greatest number of courses?
SQL: SELECT YEAR FROM SECTION GROUP BY YEAR ORDER BY count(*) DESC LIMIT 1
Database: college_2
Question: Find the year and semester when offers the largest number of courses.
SQL: SELECT semester ,  YEAR FROM SECTION GROUP BY semester ,  YEAR ORDER BY count(*) DESC LIMIT 1
Database: college_2
Question: What is the year and semester with the most courses?
SQL: SELECT semester ,  YEAR FROM SECTION GROUP BY semester ,  YEAR ORDER BY count(*) DESC LIMIT 1
Database: college_2
Question: Find the name of department has the highest amount of students?
SQL: SELECT dept_name FROM student GROUP BY dept_name ORDER BY count(*) DESC LIMIT 1
Database: college_2
Question: What is the name of the deparment with the highest enrollment?
SQL: SELECT dept_name FROM student GROUP BY dept_name ORDER BY count(*) DESC LIMIT 1
Database: college_2
Question: Find the total number of students in each department.
SQL: SELECT count(*) ,  dept_name FROM student GROUP BY dept_name
Database: college_2
Question: How many students are in each department?
SQL: SELECT count(*) ,  dept_name FROM student GROUP BY dept_name
Database: college_2
Question: Find the semester and year which has the least number of student taking any class.
SQL: SELECT semester ,  YEAR FROM takes GROUP BY semester ,  YEAR ORDER BY count(*) LIMIT 1
Database: college_2
Question: Which semeseter and year had the fewest students?
SQL: SELECT semester ,  YEAR FROM takes GROUP BY semester ,  YEAR ORDER BY count(*) LIMIT 1
Database: college_2
Question: What is the id of the instructor who advises of all students from History department?
SQL: SELECT i_id FROM advisor AS T1 JOIN student AS T2 ON T1.s_id  =  T2.id WHERE T2.dept_name  =  'History'
Database: college_2
Question: Give id of the instructor who advises students in the History department.
SQL: SELECT i_id FROM advisor AS T1 JOIN student AS T2 ON T1.s_id  =  T2.id WHERE T2.dept_name  =  'History'
Database: college_2
Question: Find the name and salary of the instructors who are advisors of any student from History department?
SQL: SELECT T2.name ,  T2.salary FROM advisor AS T1 JOIN instructor AS T2 ON T1.i_id  =  T2.id JOIN student AS T3 ON T1.s_id  =  T3.id WHERE T3.dept_name  =  'History'
Database: college_2
Question: What are the names and salaries of instructors who advises students in the History department?
SQL: SELECT T2.name ,  T2.salary FROM advisor AS T1 JOIN instructor AS T2 ON T1.i_id  =  T2.id JOIN student AS T3 ON T1.s_id  =  T3.id WHERE T3.dept_name  =  'History'
Database: college_2
Question: Find the id of the courses that do not have any prerequisite?
SQL: SELECT course_id FROM course EXCEPT SELECT course_id FROM prereq
Database: college_2
Question: What are the ids of courses without prerequisites?
SQL: SELECT course_id FROM course EXCEPT SELECT course_id FROM prereq
Database: college_2
Question: What are the names of courses without prerequisites?
SQL: SELECT title FROM course WHERE course_id NOT IN (SELECT course_id FROM prereq)
Database: college_2
Question: What is the title of the prerequisite class of International Finance course?
SQL: SELECT title FROM course WHERE course_id IN (SELECT T1.prereq_id FROM prereq AS T1 JOIN course AS T2 ON T1.course_id  =  T2.course_id WHERE T2.title  =  'International Finance')
Database: college_2
Question: Give the title of the prerequisite to the course International Finance.
SQL: SELECT title FROM course WHERE course_id IN (SELECT T1.prereq_id FROM prereq AS T1 JOIN course AS T2 ON T1.course_id  =  T2.course_id WHERE T2.title  =  'International Finance')
Database: college_2
Question: Find the title of course whose prerequisite is course Differential Geometry.
SQL: SELECT title FROM course WHERE course_id IN (SELECT T1.course_id FROM prereq AS T1 JOIN course AS T2 ON T1.prereq_id  =  T2.course_id WHERE T2.title  =  'Differential Geometry')
Database: college_2
Question: What is the title of the course with Differential Geometry as a prerequisite?
SQL: SELECT title FROM course WHERE course_id IN (SELECT T1.course_id FROM prereq AS T1 JOIN course AS T2 ON T1.prereq_id  =  T2.course_id WHERE T2.title  =  'Differential Geometry')
Database: college_2
Question: Find the names of students who have taken any course in the fall semester of year 2003.
SQL: SELECT name FROM student WHERE id IN (SELECT id FROM takes WHERE semester  =  'Fall' AND YEAR  =  2003)
Database: college_2
Question: What are the names of students who took a course in the Fall of 2003?
SQL: SELECT name FROM student WHERE id IN (SELECT id FROM takes WHERE semester  =  'Fall' AND YEAR  =  2003)
Database: college_2
Question: What is the title of the course that was offered at building Chandler during the fall semester in the year of 2010?
SQL: SELECT T1.title FROM course AS T1 JOIN SECTION AS T2 ON T1.course_id  =  T2.course_id WHERE building  =  'Chandler' AND semester  =  'Fall' AND YEAR  =  2010
Database: college_2
Question: Give the title of the course offered in Chandler during the Fall of 2010.
SQL: SELECT T1.title FROM course AS T1 JOIN SECTION AS T2 ON T1.course_id  =  T2.course_id WHERE building  =  'Chandler' AND semester  =  'Fall' AND YEAR  =  2010
Database: college_2
Question: Find the name of the instructors who taught C Programming course before.
SQL: SELECT T1.name FROM instructor AS T1 JOIN teaches AS T2 ON T1.id  =  T2.id JOIN course AS T3 ON T2.course_id  =  T3.course_id WHERE T3.title  =  'C Programming'
Database: college_2
Question: What are the names of instructors who have taught C Programming courses?
SQL: SELECT T1.name FROM instructor AS T1 JOIN teaches AS T2 ON T1.id  =  T2.id JOIN course AS T3 ON T2.course_id  =  T3.course_id WHERE T3.title  =  'C Programming'
Database: college_2
Question: Find the name and salary of instructors who are advisors of the students from the Math department.
SQL: SELECT T2.name ,  T2.salary FROM advisor AS T1 JOIN instructor AS T2 ON T1.i_id  =  T2.id JOIN student AS T3 ON T1.s_id  =  T3.id WHERE T3.dept_name  =  'Math'
Database: college_2
Question: What are the names and salaries of instructors who advise students in the Math department?
SQL: SELECT T2.name ,  T2.salary FROM advisor AS T1 JOIN instructor AS T2 ON T1.i_id  =  T2.id JOIN student AS T3 ON T1.s_id  =  T3.id WHERE T3.dept_name  =  'Math'
Database: college_2
Question: Find the name of instructors who are advisors of the students from the Math department, and sort the results by students' total credit.
SQL: SELECT T2.name FROM advisor AS T1 JOIN instructor AS T2 ON T1.i_id  =  T2.id JOIN student AS T3 ON T1.s_id  =  T3.id WHERE T3.dept_name  =  'Math' ORDER BY T3.tot_cred
Database: college_2
Question: What are the names of all instructors who advise students in the math depart sorted by total credits of the student.
SQL: SELECT T2.name FROM advisor AS T1 JOIN instructor AS T2 ON T1.i_id  =  T2.id JOIN student AS T3 ON T1.s_id  =  T3.id WHERE T3.dept_name  =  'Math' ORDER BY T3.tot_cred
Database: college_2
Question: What is the course title of the prerequisite of course Mobile Computing?
SQL: SELECT title FROM course WHERE course_id IN (SELECT T1.prereq_id FROM prereq AS T1 JOIN course AS T2 ON T1.course_id  =  T2.course_id WHERE T2.title  =  'Mobile Computing')
Database: college_2
Question: What is the title of the course that is a prerequisite for Mobile Computing?
SQL: SELECT title FROM course WHERE course_id IN (SELECT T1.prereq_id FROM prereq AS T1 JOIN course AS T2 ON T1.course_id  =  T2.course_id WHERE T2.title  =  'Mobile Computing')
Database: college_2
Question: Find the name of instructor who is the advisor of the student who has the highest number of total credits.
SQL: SELECT T2.name FROM advisor AS T1 JOIN instructor AS T2 ON T1.i_id  =  T2.id JOIN student AS T3 ON T1.s_id  =  T3.id ORDER BY T3.tot_cred DESC LIMIT 1
Database: college_2
Question: What is the name of the instructor who advises the student with the greatest number of total credits?
SQL: SELECT T2.name FROM advisor AS T1 JOIN instructor AS T2 ON T1.i_id  =  T2.id JOIN student AS T3 ON T1.s_id  =  T3.id ORDER BY T3.tot_cred DESC LIMIT 1
Database: college_2
Question: Find the name of instructors who didn't teach any courses?
SQL: SELECT name FROM instructor WHERE id NOT IN (SELECT id FROM teaches)
Database: college_2
Question: What are the names of instructors who didn't teach?
SQL: SELECT name FROM instructor WHERE id NOT IN (SELECT id FROM teaches)
Database: college_2
Question: Find the id of instructors who didn't teach any courses?
SQL: SELECT id FROM instructor EXCEPT SELECT id FROM teaches
Database: college_2
Question: What are the ids of instructors who didnt' teach?
SQL: SELECT id FROM instructor EXCEPT SELECT id FROM teaches
Database: college_2
Question: Find the names of instructors who didn't each any courses in any Spring semester.
SQL: SELECT name FROM instructor WHERE id NOT IN (SELECT id FROM teaches WHERE semester  =  'Spring')
Database: college_2
Question: What are the names of instructors who didn't teach courses in the Spring?
SQL: SELECT name FROM instructor WHERE id NOT IN (SELECT id FROM teaches WHERE semester  =  'Spring')
Database: college_2
Question: Find the name of the department which has the highest average salary of professors.
SQL: SELECT dept_name FROM instructor GROUP BY dept_name ORDER BY avg(salary) DESC LIMIT 1
Database: college_2
Question: Which department has the highest average instructor salary?
SQL: SELECT dept_name FROM instructor GROUP BY dept_name ORDER BY avg(salary) DESC LIMIT 1
Database: college_2
Question: Find the number and averaged salary of all instructors who are in the department with the highest budget.
SQL: SELECT avg(T1.salary) ,  count(*) FROM instructor AS T1 JOIN department AS T2 ON T1.dept_name  =  T2.dept_name ORDER BY T2.budget DESC LIMIT 1
Database: college_2
Question: How many instructors are in the department with the highest budget, and what is their average salary?
SQL: SELECT avg(T1.salary) ,  count(*) FROM instructor AS T1 JOIN department AS T2 ON T1.dept_name  =  T2.dept_name ORDER BY T2.budget DESC LIMIT 1
Database: college_2
Question: What is the title and credits of the course that is taught in the largest classroom (with the highest capacity)?
SQL: SELECT T3.title ,  T3.credits FROM classroom AS T1 JOIN SECTION AS T2 ON T1.building  =  T2.building AND T1.room_number  =  T2.room_number JOIN course AS T3 ON T2.course_id  =  T3.course_id WHERE T1.capacity  =  (SELECT max(capacity) FROM classroom)
Database: college_2
Question: Give the title and credits for the course that is taught in the classroom with the greatest capacity.
SQL: SELECT T3.title ,  T3.credits FROM classroom AS T1 JOIN SECTION AS T2 ON T1.building  =  T2.building AND T1.room_number  =  T2.room_number JOIN course AS T3 ON T2.course_id  =  T3.course_id WHERE T1.capacity  =  (SELECT max(capacity) FROM classroom)
Database: college_2
Question: Find the name of students who didn't take any course from Biology department.
SQL: SELECT name FROM student WHERE id NOT IN (SELECT T1.id FROM takes AS T1 JOIN course AS T2 ON T1.course_id  =  T2.course_id WHERE T2.dept_name  =  'Biology')
Database: college_2
Question: What are the names of students who haven't taken any Biology courses?
SQL: SELECT name FROM student WHERE id NOT IN (SELECT T1.id FROM takes AS T1 JOIN course AS T2 ON T1.course_id  =  T2.course_id WHERE T2.dept_name  =  'Biology')
Database: college_2
Question: Find the total number of students and total number of instructors for each department.
SQL: SELECT count(DISTINCT T2.id) ,  count(DISTINCT T3.id) ,  T3.dept_name FROM department AS T1 JOIN student AS T2 ON T1.dept_name  =  T2.dept_name JOIN instructor AS T3 ON T1.dept_name  =  T3.dept_name GROUP BY T3.dept_name
Database: college_2
Question: How many students and instructors are in each department?
SQL: SELECT count(DISTINCT T2.id) ,  count(DISTINCT T3.id) ,  T3.dept_name FROM department AS T1 JOIN student AS T2 ON T1.dept_name  =  T2.dept_name JOIN instructor AS T3 ON T1.dept_name  =  T3.dept_name GROUP BY T3.dept_name
Database: college_2
Question: Find the name of students who have taken the prerequisite course of the course with title International Finance.
SQL: SELECT T1.name FROM student AS T1 JOIN takes AS T2 ON T1.id  =  T2.id WHERE T2.course_id IN (SELECT T4.prereq_id FROM course AS T3 JOIN prereq AS T4 ON T3.course_id  =  T4.course_id WHERE T3.title  =  'International Finance')
Database: college_2
Question: What are the names of students who have taken the prerequisite for the course International Finance?
SQL: SELECT T1.name FROM student AS T1 JOIN takes AS T2 ON T1.id  =  T2.id WHERE T2.course_id IN (SELECT T4.prereq_id FROM course AS T3 JOIN prereq AS T4 ON T3.course_id  =  T4.course_id WHERE T3.title  =  'International Finance')
Database: college_2
Question: Find the name and salary of instructors whose salary is below the average salary of the instructors in the Physics department.
SQL: SELECT name ,  salary FROM instructor WHERE salary  <  (SELECT avg(salary) FROM instructor WHERE dept_name  =  'Physics')
Database: college_2
Question: What are the names and salaries for instructors who earn less than the average salary of instructors in the Physics department?
SQL: SELECT name ,  salary FROM instructor WHERE salary  <  (SELECT avg(salary) FROM instructor WHERE dept_name  =  'Physics')
Database: college_2
Question: Find the name of students who took some course offered by Statistics department.
SQL: SELECT T3.name FROM course AS T1 JOIN takes AS T2 ON T1.course_id  =  T2.course_id JOIN student AS T3 ON T2.id  =  T3.id WHERE T1.dept_name  =  'Statistics'
Database: college_2
Question: What are the names of students who have taken Statistics courses?
SQL: SELECT T3.name FROM course AS T1 JOIN takes AS T2 ON T1.course_id  =  T2.course_id JOIN student AS T3 ON T2.id  =  T3.id WHERE T1.dept_name  =  'Statistics'
Database: college_2
Question: Find the building, room number, semester and year of all courses offered by Psychology department sorted by course titles.
SQL: SELECT T2.building ,  T2.room_number ,  T2.semester ,  T2.year FROM course AS T1 JOIN SECTION AS T2 ON T1.course_id  =  T2.course_id WHERE T1.dept_name  =  'Psychology' ORDER BY T1.title
Database: college_2
Question: What are the building, room number, semester and year of courses in the Psychology department, sorted using course title?
SQL: SELECT T2.building ,  T2.room_number ,  T2.semester ,  T2.year FROM course AS T1 JOIN SECTION AS T2 ON T1.course_id  =  T2.course_id WHERE T1.dept_name  =  'Psychology' ORDER BY T1.title
Database: college_2
Question: Find the names of all instructors in computer science department
SQL: SELECT name FROM instructor WHERE dept_name  =  'Comp. Sci.'
Database: college_2
Question: What are the names of all instructors in the Comp. Sci. department?
SQL: SELECT name FROM instructor WHERE dept_name  =  'Comp. Sci.'
Database: college_2
Question: Find the names of all instructors in Comp. Sci. department with salary > 80000.
SQL: SELECT name FROM instructor WHERE dept_name  =  'Comp. Sci.'  AND salary  >  80000
Database: college_2
Question: What are the names of the instructors in the Comp. Sci. department who earn more than 80000?
SQL: SELECT name FROM instructor WHERE dept_name  =  'Comp. Sci.'  AND salary  >  80000
Database: college_2
Question: Find the names of all instructors who have taught some course and the course_id.
SQL: SELECT name ,  course_id FROM instructor AS T1 JOIN teaches AS T2 ON T1.ID  =  T2.ID
Database: college_2
Question: What are the names of all instructors who have taught a course, as well as the corresponding course id?
SQL: SELECT name ,  course_id FROM instructor AS T1 JOIN teaches AS T2 ON T1.ID  =  T2.ID
Database: college_2
Question: Find the names of all instructors in the Art department who have taught some course and the course_id.
SQL: SELECT name ,  course_id FROM instructor AS T1 JOIN teaches AS T2 ON T1.ID  =  T2.ID WHERE T1.dept_name  =  'Art'
Database: college_2
Question: What are the names of Art instructors who have taught a course, and the corresponding course id?
SQL: SELECT name ,  course_id FROM instructor AS T1 JOIN teaches AS T2 ON T1.ID  =  T2.ID WHERE T1.dept_name  =  'Art'
Database: college_2
Question: Find the names of all instructors whose name includes the substring “dar”.
SQL: SELECT name FROM instructor WHERE name LIKE '%dar%'
Database: college_2
Question: What are the names of all instructors with names that include "dar"?
SQL: SELECT name FROM instructor WHERE name LIKE '%dar%'
Database: college_2
Question: List in alphabetic order the names of all distinct instructors.
SQL: SELECT DISTINCT name FROM  instructor ORDER BY name
Database: college_2
Question: List the distinct names of the instructors, ordered by name.
SQL: SELECT DISTINCT name FROM  instructor ORDER BY name
Database: college_2
Question: Find courses that ran in Fall 2009 or in Spring 2010.
SQL: SELECT course_id FROM SECTION WHERE semester  =  'Fall' AND YEAR  =  2009 UNION SELECT course_id FROM SECTION WHERE semester  =  'Spring' AND YEAR  =  2010
Database: college_2
Question: What are the ids for courses in the Fall of 2009 or the Spring of 2010?
SQL: SELECT course_id FROM SECTION WHERE semester  =  'Fall' AND YEAR  =  2009 UNION SELECT course_id FROM SECTION WHERE semester  =  'Spring' AND YEAR  =  2010
Database: college_2
Question: Find courses that ran in Fall 2009 and in Spring 2010.
SQL: SELECT course_id FROM SECTION WHERE semester  =  'Fall' AND YEAR  =  2009 INTERSECT SELECT course_id FROM SECTION WHERE semester  =  'Spring' AND YEAR  =  2010
Database: college_2
Question: What are the ids for courses that were offered in both Fall of 2009 and Spring of 2010?
SQL: SELECT course_id FROM SECTION WHERE semester  =  'Fall' AND YEAR  =  2009 INTERSECT SELECT course_id FROM SECTION WHERE semester  =  'Spring' AND YEAR  =  2010
Database: college_2
Question: Find courses that ran in Fall 2009 but not in Spring 2010.
SQL: SELECT course_id FROM SECTION WHERE semester  =  'Fall' AND YEAR  =  2009 EXCEPT SELECT course_id FROM SECTION WHERE semester  =  'Spring' AND YEAR  =  2010
Database: college_2
Question: What are the ids of courses offered in Fall of 2009 but not in Spring of 2010?
SQL: SELECT course_id FROM SECTION WHERE semester  =  'Fall' AND YEAR  =  2009 EXCEPT SELECT course_id FROM SECTION WHERE semester  =  'Spring' AND YEAR  =  2010
Database: college_2
Question: Find the salaries of all distinct instructors that are less than the largest salary.
SQL: SELECT DISTINCT salary FROM instructor WHERE salary  <  (SELECT max(salary) FROM instructor)
Database: college_2
Question: What are the distinct salaries of all instructors who earned less than the maximum salary?
SQL: SELECT DISTINCT salary FROM instructor WHERE salary  <  (SELECT max(salary) FROM instructor)
Database: college_2
Question: Find the total number of instructors who teach a course in the Spring 2010 semester.
SQL: SELECT COUNT (DISTINCT ID) FROM teaches WHERE semester  =  'Spring' AND YEAR  =  2010
Database: college_2
Question: How many instructors teach a course in the Spring of 2010?
SQL: SELECT COUNT (DISTINCT ID) FROM teaches WHERE semester  =  'Spring' AND YEAR  =  2010
Database: college_2
Question: Find the names and average salaries of all departments whose average salary is greater than 42000.
SQL: SELECT dept_name ,  AVG (salary) FROM instructor GROUP BY dept_name HAVING AVG (salary)  >  42000
Database: college_2
Question: What are the names and average salaries for departments with average salary higher than 42000?
SQL: SELECT dept_name ,  AVG (salary) FROM instructor GROUP BY dept_name HAVING AVG (salary)  >  42000
Database: college_2
Question: Find names of instructors with salary greater than that of some (at least one) instructor in the Biology department.
SQL: SELECT name FROM instructor WHERE salary  >  (SELECT min(salary) FROM instructor WHERE dept_name  =  'Biology')
Database: college_2
Question: What are the names of instructors who earn more than at least one instructor from the Biology department?
SQL: SELECT name FROM instructor WHERE salary  >  (SELECT min(salary) FROM instructor WHERE dept_name  =  'Biology')
Database: college_2
Question: Find the names of all instructors whose salary is greater than the salary of all instructors in the Biology department.
SQL: SELECT name FROM instructor WHERE salary  >  (SELECT max(salary) FROM instructor WHERE dept_name  =  'Biology')
Database: college_2
Question: What are the names of all instructors with a higher salary than any of the instructors in the Biology department?
SQL: SELECT name FROM instructor WHERE salary  >  (SELECT max(salary) FROM instructor WHERE dept_name  =  'Biology')
Database: debate
Question: How many debates are there?
SQL: SELECT count(*) FROM debate
Database: debate
Question: List the venues of debates in ascending order of the number of audience.
SQL: SELECT Venue FROM debate ORDER BY Num_of_Audience ASC
Database: debate
Question: What are the date and venue of each debate?
SQL: SELECT Date ,  Venue FROM debate
Database: debate
Question: List the dates of debates with number of audience bigger than 150
SQL: SELECT Date FROM debate WHERE Num_of_Audience  >  150
Database: debate
Question: Show the names of people aged either 35 or 36.
SQL: SELECT Name FROM  people WHERE Age  =  35 OR Age  =  36
Database: debate
Question: What is the party of the youngest people?
SQL: SELECT Party FROM people ORDER BY Age ASC LIMIT 1
Database: debate
Question: Show different parties of people along with the number of people in each party.
SQL: SELECT Party ,  COUNT(*) FROM people GROUP BY Party
Database: debate
Question: Show the party that has the most people.
SQL: SELECT Party FROM people GROUP BY Party ORDER BY COUNT(*) DESC LIMIT 1
Database: debate
Question: Show the distinct venues of debates
SQL: SELECT DISTINCT Venue FROM debate
Database: debate
Question: Show the names of people, and dates and venues of debates they are on the affirmative side.
SQL: SELECT T3.Name ,  T2.Date ,  T2.Venue FROM debate_people AS T1 JOIN debate AS T2 ON T1.Debate_ID  =  T2.Debate_ID JOIN people AS T3 ON T1.Affirmative  =  T3.People_ID
Database: debate
Question: Show the names of people, and dates and venues of debates they are on the negative side, ordered in ascending alphabetical order of name.
SQL: SELECT T3.Name ,  T2.Date ,  T2.Venue FROM debate_people AS T1 JOIN debate AS T2 ON T1.Debate_ID  =  T2.Debate_ID JOIN people AS T3 ON T1.Negative  =  T3.People_ID ORDER BY T3.Name ASC
Database: debate
Question: Show the names of people that are on affirmative side of debates with number of audience bigger than 200.
SQL: SELECT T3.Name FROM debate_people AS T1 JOIN debate AS T2 ON T1.Debate_ID  =  T2.Debate_ID JOIN people AS T3 ON T1.Affirmative  =  T3.People_ID WHERE T2.Num_of_Audience  >  200
Database: debate
Question: Show the names of people and the number of times they have been on the affirmative side of debates.
SQL: SELECT T2.Name ,  COUNT(*) FROM debate_people AS T1 JOIN people AS T2 ON T1.Affirmative  =  T2.People_ID GROUP BY T2.Name
Database: debate
Question: Show the names of people who have been on the negative side of debates at least twice.
SQL: SELECT T2.Name FROM debate_people AS T1 JOIN people AS T2 ON T1.Negative  =  T2.People_ID GROUP BY T2.Name HAVING COUNT(*)  >=  2
Database: debate
Question: List the names of people that have not been on the affirmative side of debates.
SQL: SELECT Name FROM people WHERE People_id NOT IN (SELECT Affirmative FROM debate_people)
Database: insurance_and_eClaims
Question: List the names of all the customers in alphabetical order.
SQL: SELECT customer_details FROM customers ORDER BY customer_details
Database: insurance_and_eClaims
Question: Sort the customer names in alphabetical order.
SQL: SELECT customer_details FROM customers ORDER BY customer_details
Database: insurance_and_eClaims
Question: Find all the policy type codes associated with the customer "Dayana Robel"
SQL: SELECT policy_type_code FROM policies AS t1 JOIN customers AS t2 ON t1.customer_id  =  t2.customer_id WHERE t2.customer_details  =  "Dayana Robel"
Database: insurance_and_eClaims
Question: What are the type codes of the policies used by the customer "Dayana Robel"?
SQL: SELECT policy_type_code FROM policies AS t1 JOIN customers AS t2 ON t1.customer_id  =  t2.customer_id WHERE t2.customer_details  =  "Dayana Robel"
Database: insurance_and_eClaims
Question: Which type of policy is most frequently used? Give me the policy type code.
SQL: SELECT policy_type_code FROM policies GROUP BY policy_type_code ORDER BY count(*) DESC LIMIT 1
Database: insurance_and_eClaims
Question: Find the type code of the most frequently used policy.
SQL: SELECT policy_type_code FROM policies GROUP BY policy_type_code ORDER BY count(*) DESC LIMIT 1
Database: insurance_and_eClaims
Question: Find all the policy types that are used by more than 2 customers.
SQL: SELECT policy_type_code FROM policies GROUP BY policy_type_code HAVING count(*)  >  2
Database: insurance_and_eClaims
Question: Which types of policy are chosen by more than 2 customers? Give me the policy type codes.
SQL: SELECT policy_type_code FROM policies GROUP BY policy_type_code HAVING count(*)  >  2
Database: insurance_and_eClaims
Question: Find the total and average amount paid in claim headers.
SQL: SELECT sum(amount_piad) ,  avg(amount_piad) FROM claim_headers
Database: insurance_and_eClaims
Question: What are the total amount and average amount paid in claim headers?
SQL: SELECT sum(amount_piad) ,  avg(amount_piad) FROM claim_headers
Database: insurance_and_eClaims
Question: Find the total amount claimed in the most recently created document.
SQL: SELECT sum(t1.amount_claimed) FROM claim_headers AS t1 JOIN claims_documents AS t2 ON t1.claim_header_id  =  t2.claim_id WHERE t2.created_date  =  (SELECT created_date FROM claims_documents ORDER BY created_date LIMIT 1)
Database: insurance_and_eClaims
Question: How much amount in total were claimed in the most recently created document?
SQL: SELECT sum(t1.amount_claimed) FROM claim_headers AS t1 JOIN claims_documents AS t2 ON t1.claim_header_id  =  t2.claim_id WHERE t2.created_date  =  (SELECT created_date FROM claims_documents ORDER BY created_date LIMIT 1)
Database: insurance_and_eClaims
Question: What is the name of the customer who has made the largest amount of claim in a single claim?
SQL: SELECT t3.customer_details FROM claim_headers AS t1 JOIN policies AS t2 ON t1.policy_id  =  t2.policy_id JOIN customers AS t3 ON t2.customer_id  =  t3.customer_id WHERE t1.amount_claimed  =  (SELECT max(amount_claimed) FROM claim_headers)
Database: insurance_and_eClaims
Question: Which customer made the largest amount of claim in a single claim? Return the customer details.
SQL: SELECT t3.customer_details FROM claim_headers AS t1 JOIN policies AS t2 ON t1.policy_id  =  t2.policy_id JOIN customers AS t3 ON t2.customer_id  =  t3.customer_id WHERE t1.amount_claimed  =  (SELECT max(amount_claimed) FROM claim_headers)