interaction_utterance
sequencelengths 0
6
| interaction_query
sequencelengths 0
6
| final_utterance
stringlengths 19
224
| final_query
stringlengths 22
577
| db_id
stringclasses 140
values |
---|---|---|---|---|
[
"How many campuses opened after 1935?",
"Among these campuses, how many of them opened before 1939?",
"Show its name."
] | [
"SELECT COUNT(*) FROM campuses WHERE YEAR >= 1935",
"SELECT COUNT(*) FROM campuses WHERE YEAR >= 1935 AND YEAR <= 1939",
"SELECT campus FROM campuses WHERE YEAR >= 1935 AND YEAR <= 1939"
] | Which campus was opened between 1935 and 1939? | SELECT campus FROM campuses WHERE YEAR >= 1935 AND YEAR <= 1939 | csu_1 |
[
"Which campuses are in Northridge, Los Angeles?",
"How many are there?",
"How about the number of campuses that are in San Francisco, San Francisco?",
"Please add them.",
"Show the names of the campuses."
] | [
"SELECT campus FROM campuses WHERE LOCATION = \"Northridge\" AND county = \"Los Angeles\"",
"SELECT COUNT(*) FROM campuses WHERE LOCATION = \"Northridge\" AND county = \"Los Angeles\"",
"SELECT COUNT(*) FROM campuses WHERE LOCATION = \"San Francisco\" AND county = \"San Francisco\"",
"SELECT COUNT(*) FROM (SELECT campus FROM campuses WHERE LOCATION = \"Northridge\" AND county = \"Los Angeles\" UNION SELECT campus FROM campuses WHERE LOCATION = \"San Francisco\" AND county = \"San Francisco\")",
"SELECT campus FROM campuses WHERE LOCATION = \"Northridge\" AND county = \"Los Angeles\" UNION SELECT campus FROM campuses WHERE LOCATION = \"San Francisco\" AND county = \"San Francisco\""
] | Find the name of the campuses that is in Northridge, Los Angeles or in San Francisco, San Francisco. | SELECT campus FROM campuses WHERE LOCATION = "Northridge" AND county = "Los Angeles" UNION SELECT campus FROM campuses WHERE LOCATION = "San Francisco" AND county = "San Francisco" | csu_1 |
[
"What is the campus fee of \"California State University-Channel Islands\" in year 2003?",
"How about \"San Jose State University\" in year 1995?",
"How about \"San Jose State University\" in year 1996?"
] | [
"SELECT campusfee FROM campuses AS T1 JOIN csu_fees AS T2 ON T1.id = t2.campus WHERE t1.campus = \"California State University-Channel Islands\" AND T2.year = 2003",
"SELECT campusfee FROM campuses AS T1 JOIN csu_fees AS T2 ON T1.id = t2.campus WHERE t1.campus = \"San Jose State University\" AND T2.year = 1995",
"SELECT campusfee FROM campuses AS T1 JOIN csu_fees AS T2 ON T1.id = t2.campus WHERE t1.campus = \"San Jose State University\" AND T2.year = 1996"
] | What is the campus fee of "San Jose State University" in year 1996? | SELECT campusfee FROM campuses AS T1 JOIN csu_fees AS T2 ON T1.id = t2.campus WHERE t1.campus = "San Jose State University" AND T2.year = 1996 | csu_1 |
[
"Show the campus fee of all campuses in year 1996.",
"What is the highest among them?",
"What is the fee of \"San Francisco State University\"?"
] | [
"SELECT campusfee FROM campuses AS T1 JOIN csu_fees AS T2 ON T1.id = t2.campus WHERE T2.year = 1996",
"SELECT MAX(campusfee) FROM campuses AS T1 JOIN csu_fees AS T2 ON T1.id = t2.campus WHERE T2.year = 1996",
"SELECT campusfee FROM campuses AS T1 JOIN csu_fees AS T2 ON T1.id = t2.campus WHERE t1.campus = \"San Francisco State University\" AND T2.year = 1996"
] | What is the campus fee of "San Francisco State University" in year 1996? | SELECT campusfee FROM campuses AS T1 JOIN csu_fees AS T2 ON T1.id = t2.campus WHERE t1.campus = "San Francisco State University" AND T2.year = 1996 | csu_1 |
[
"What is the maximum campus fee?",
"How many universities are there?",
"How about the number of universities whose campus fee is greater than the average campus fee?"
] | [
"SELECT MAX(campusfee) FROM csu_fees",
"SELECT count(*) FROM csu_fees",
"SELECT count(*) FROM csu_fees WHERE campusfee > (SELECT avg(campusfee) FROM csu_fees)"
] | Find the count of universities whose campus fee is greater than the average campus fee. | SELECT count(*) FROM csu_fees WHERE campusfee > (SELECT avg(campusfee) FROM csu_fees) | csu_1 |
[
"How many universities are in Los Angeles?",
"How many of them opened after 1950?",
"Please show their names."
] | [
"SELECT COUNT(campus) FROM campuses WHERE county = \"Los Angeles\"",
"SELECT COUNT(*) FROM campuses WHERE county = \"Los Angeles\" AND YEAR > 1950",
"SELECT campus FROM campuses WHERE county = \"Los Angeles\" AND YEAR > 1950"
] | Which university is in Los Angeles county and opened after 1950? | SELECT campus FROM campuses WHERE county = "Los Angeles" AND YEAR > 1950 | csu_1 |
[
"What is the total number of degrees conferred?",
"How many degrees are conferred in each year?",
"Which year has the most degrees conferred?"
] | [
"SELECT SUM(Degrees) FROM degrees",
"SELECT Year, COUNT(*) FROM degrees GROUP BY YEAR",
"SELECT YEAR FROM degrees GROUP BY YEAR ORDER BY sum(degrees) DESC LIMIT 1"
] | Which year has the most degrees conferred? | SELECT YEAR FROM degrees GROUP BY YEAR ORDER BY sum(degrees) DESC LIMIT 1 | csu_1 |
[
"How many campuses are there that have degrees conferred?",
"How many degrees does each campus confer?",
"Which campus had the most degrees conferred in 1990?",
"How about overall?"
] | [
"SELECT COUNT(DISTINCT campus) FROM degrees",
"SELECT campus, COUNT(*) FROM degrees GROUP BY campus",
"SELECT campus FROM degrees WHERE year = 2002 GROUP BY campus ORDER BY sum(degrees) DESC LIMIT 1",
"SELECT campus FROM degrees GROUP BY campus ORDER BY sum(degrees) DESC LIMIT 1"
] | Which campus has the most degrees conferred in all times? | SELECT campus FROM degrees GROUP BY campus ORDER BY sum(degrees) DESC LIMIT 1 | csu_1 |
[
"How many faculties are there in Campus 1 in year 2002?",
"Which campus had the most faculty in year 2002?",
"How about in year 2003?"
] | [
"SELECT Faculty FROM faculty WHERE Year = 2002 AND Campus = 1",
"SELECT T1.campus FROM campuses AS T1 JOIN faculty AS T2 ON T1.id = T2.campus WHERE T2.year = 2002 ORDER BY T2.faculty DESC LIMIT 1",
"SELECT T1.campus FROM campuses AS T1 JOIN faculty AS T2 ON T1.id = T2.campus WHERE T2.year = 2003 ORDER BY T2.faculty DESC LIMIT 1"
] | Which campus has the most faculties in year 2003? | SELECT T1.campus FROM campuses AS T1 JOIN faculty AS T2 ON T1.id = T2.campus WHERE T2.year = 2003 ORDER BY T2.faculty DESC LIMIT 1 | csu_1 |
[
"How many different campuses are there?",
"How many degrees are granted in each campus over all years?",
"How about between 1998 and 2002?"
] | [
"SELECT COUNT(*) FROM campuses",
"SELECT T1.campus , sum(T2.degrees) FROM campuses AS T1 JOIN degrees AS T2 ON T1.id = T2.campus GROUP BY T1.campus",
"SELECT T1.campus , sum(T2.degrees) FROM campuses AS T1 JOIN degrees AS T2 ON T1.id = T2.campus WHERE T2.year >= 1998 AND T2.year <= 2002 GROUP BY T1.campus"
] | report the total number of degrees granted between 1998 and 2002 in each campus. | SELECT T1.campus , sum(T2.degrees) FROM campuses AS T1 JOIN degrees AS T2 ON T1.id = T2.campus WHERE T2.year >= 1998 AND T2.year <= 2002 GROUP BY T1.campus | csu_1 |
[
"How many campuses are in Orange county?",
"How many degrees have these campuses granted over all years?",
"How about the number after year 2000?"
] | [
"SELECT COUNT(*) FROM campuses WHERE county = \"Orange\"",
"SELECT T1.campus , sum(T2.degrees) FROM campuses AS T1 JOIN degrees AS T2 ON T1.id = T2.campus WHERE T1.county = \"Orange\" GROUP BY T1.campus",
"SELECT T1.campus , sum(T2.degrees) FROM campuses AS T1 JOIN degrees AS T2 ON T1.id = T2.campus WHERE T1.county = \"Orange\" AND T2.year >= 2000 GROUP BY T1.campus"
] | For each Orange county campus, report the number of degrees granted after 2000. | SELECT T1.campus , sum(T2.degrees) FROM campuses AS T1 JOIN degrees AS T2 ON T1.id = T2.campus WHERE T1.county = "Orange" AND T2.year >= 2000 GROUP BY T1.campus | csu_1 |
[
"How many campuses are there in Orange county?",
"How many faculties are there in each campus in 2002?",
"What campus has the largest faculty in Orange county in year 2002?",
"Which campus has more faculties than this number?"
] | [
"SELECT COUNT(*) FROM campuses WHERE county = \"Orange\"",
"SELECT T1.Campus, T2.faculty FROM campuses AS T1 JOIN faculty AS T2 ON T1.id = T2.campus WHERE T2.year = 2002",
"SELECT max(faculty) FROM campuses AS T1 JOIN faculty AS T2 ON T1.id = T2.campus WHERE T2.year = 2002 AND T1.county = \"Orange\"",
"SELECT T1.campus FROM campuses AS T1 JOIN faculty AS T2 ON T1.id = T2.campus WHERE T2.year = 2002 AND faculty > (SELECT max(faculty) FROM campuses AS T1 JOIN faculty AS T2 ON T1.id = T2.campus WHERE T2.year = 2002 AND T1.county = \"Orange\")"
] | Find the names of the campus which has more faculties in 2002 than every campus in Orange county. | SELECT T1.campus FROM campuses AS T1 JOIN faculty AS T2 ON T1.id = T2.campus WHERE T2.year = 2002 AND faculty > (SELECT max(faculty) FROM campuses AS T1 JOIN faculty AS T2 ON T1.id = T2.campus WHERE T2.year = 2002 AND T1.county = "Orange") | csu_1 |
[
"Show the total enrollment of campus with id 1 in each year.",
"What is the average of these numbers?",
"What campuses had more than 400 total enrollment in year 1956?",
"Among them, which campuses have more than 200 full time enrollment?"
] | [
"SELECT TotalEnrollment_AY FROM enrollments WHERE Campus = 1",
"SELECT AVG(TotalEnrollment_AY) FROM enrollments WHERE Campus = 1",
"SELECT T1.campus FROM campuses AS t1 JOIN enrollments AS t2 ON t1.id = t2.campus WHERE t2.year = 1956 AND totalenrollment_ay > 400",
"SELECT T1.campus FROM campuses AS t1 JOIN enrollments AS t2 ON t1.id = t2.campus WHERE t2.year = 1956 AND totalenrollment_ay > 400 AND FTE_AY > 200"
] | What campus had more than 400 total enrollment but more than 200 full time enrollment in year 1956? | SELECT T1.campus FROM campuses AS t1 JOIN enrollments AS t2 ON t1.id = t2.campus WHERE t2.year = 1956 AND totalenrollment_ay > 400 AND FTE_AY > 200 | csu_1 |
[
"What is the total number of degrees that are conferred in \"California State University-Channel Islands\"?",
"How about \"San Jose State University\" over all years?",
"How about in year 2001?",
"How about in year 2000?"
] | [
"SELECT SUM(degrees) FROM campuses AS T1 JOIN degrees AS T2 ON t1.id = t2.campus WHERE t1.campus = \"California State University-Channel Islands\"",
"SELECT SUM(degrees) FROM campuses AS T1 JOIN degrees AS T2 ON t1.id = t2.campus WHERE t1.campus = \"San Jose State University\"",
"SELECT degrees FROM campuses AS T1 JOIN degrees AS T2 ON t1.id = t2.campus WHERE t1.campus = \"San Jose State University\" AND t2.year = 2001",
"SELECT degrees FROM campuses AS T1 JOIN degrees AS T2 ON t1.id = t2.campus WHERE t1.campus = \"San Jose State University\" AND t2.year = 2000"
] | How many degrees were conferred in "San Jose State University" in 2000? | SELECT degrees FROM campuses AS T1 JOIN degrees AS T2 ON t1.id = t2.campus WHERE t1.campus = "San Jose State University" AND t2.year = 2000 | csu_1 |
[
"Show the faculty lines in campus \"Humboldt State University\" in every year.",
"How about those in campus \"Long Beach State University\"?",
"What is the number of faculty lines in this university in 2003?",
"How about in 2002?"
] | [
"SELECT T1.year, T1.faculty FROM faculty AS T1 JOIN campuses AS T2 ON T1.campus = T2.id WHERE T2.campus = \"Humboldt State University\"",
"SELECT T1.year, T1.faculty FROM faculty AS T1 JOIN campuses AS T2 ON T1.campus = T2.id WHERE T2.campus = \"Long Beach State University\"",
"SELECT faculty FROM faculty AS T1 JOIN campuses AS T2 ON T1.campus = T2.id WHERE T1.year = 2003 AND T2.campus = \"Long Beach State University\"",
"SELECT faculty FROM faculty AS T1 JOIN campuses AS T2 ON T1.campus = T2.id WHERE T1.year = 2002 AND T2.campus = \"Long Beach State University\""
] | What is the number of faculty lines in campus "Long Beach State University" in 2002? | SELECT faculty FROM faculty AS T1 JOIN campuses AS T2 ON T1.campus = T2.id WHERE T1.year = 2002 AND T2.campus = "Long Beach State University" | csu_1 |
[
"How many campuses have faculty lines?",
"Show their faculty lines in year 2004.",
"How many of them are between 600 and 1000?",
"Show the names of these campuses."
] | [
"SELECT COUNT(DISTINCT T1.campus) FROM campuses AS t1 JOIN faculty AS t2 ON t1.id = t2.campus",
"SELECT t2.faculty FROM campuses AS t1 JOIN faculty AS t2 ON t1.id = t2.campus WHERE T2.year = 2004",
"SELECT COUNT(*) FROM campuses AS t1 JOIN faculty AS t2 ON t1.id = t2.campus WHERE t2.faculty >= 600 AND t2.faculty <= 1000 AND T2.year = 2004",
"SELECT T1.campus FROM campuses AS t1 JOIN faculty AS t2 ON t1.id = t2.campus WHERE t2.faculty >= 600 AND t2.faculty <= 1000 AND T2.year = 2004"
] | List the campus that have between 600 and 1000 faculty lines in year 2004. | SELECT T1.campus FROM campuses AS t1 JOIN faculty AS t2 ON t1.id = t2.campus WHERE t2.faculty >= 600 AND t2.faculty <= 1000 AND T2.year = 2004 | csu_1 |
[
"How many degrees were conferred in each university in year 2002?",
"Among the results, which university conferred the most degrees?",
"What are its faculty lines?"
] | [
"SELECT T1.Campus, Degrees FROM campuses AS T1 JOIN faculty AS T2 ON T1.id = t2.campus JOIN degrees AS T3 ON T1.id = t3.campus AND t2.year = t3.year WHERE t2.year = 2002",
"SELECT T1.Campus FROM campuses AS T1 JOIN faculty AS T2 ON T1.id = t2.campus JOIN degrees AS T3 ON T1.id = t3.campus AND t2.year = t3.year WHERE t2.year = 2002 ORDER BY t3.degrees DESC LIMIT 1",
"SELECT T2.faculty FROM campuses AS T1 JOIN faculty AS T2 ON T1.id = t2.campus JOIN degrees AS T3 ON T1.id = t3.campus AND t2.year = t3.year WHERE t2.year = 2002 ORDER BY t3.degrees DESC LIMIT 1"
] | How many faculty lines are there in the university that conferred the most number of degrees in year 2002? | SELECT T2.faculty FROM campuses AS T1 JOIN faculty AS T2 ON T1.id = t2.campus JOIN degrees AS T3 ON T1.id = t3.campus AND t2.year = t3.year WHERE t2.year = 2002 ORDER BY t3.degrees DESC LIMIT 1 | csu_1 |
[
"When did \"San Jose State University\" open?",
"How many undergraduates were there in \"San Jose State University\" in year 2000?",
"How about in year 2004?"
] | [
"SELECT Year FROM campuses WHERE campus = \"San Jose State University\"",
"SELECT sum(t1.undergraduate) FROM discipline_enrollments AS t1 JOIN campuses AS t2 ON t1.campus = t2.id WHERE t1.year = 2000 AND t2.campus = \"San Jose State University\"",
"SELECT sum(t1.undergraduate) FROM discipline_enrollments AS t1 JOIN campuses AS t2 ON t1.campus = t2.id WHERE t1.year = 2004 AND t2.campus = \"San Jose State University\""
] | How many undergraduates are there in "San Jose State University" in year 2004? | SELECT sum(t1.undergraduate) FROM discipline_enrollments AS t1 JOIN campuses AS t2 ON t1.campus = t2.id WHERE t1.year = 2004 AND t2.campus = "San Jose State University" | csu_1 |
[
"Which county is \"San Francisco State University\" located?",
"How many graduates were there in this university in year 2003?",
"How about in 2004?"
] | [
"SELECT County FROM campuses WHERE campus = \"San Francisco State University\"",
"SELECT sum(t1.graduate) FROM discipline_enrollments AS t1 JOIN campuses AS t2 ON t1.campus = t2.id WHERE t1.year = 2003 AND t2.campus = \"San Francisco State University\"",
"SELECT sum(t1.graduate) FROM discipline_enrollments AS t1 JOIN campuses AS t2 ON t1.campus = t2.id WHERE t1.year = 2004 AND t2.campus = \"San Francisco State University\""
] | What is the number of graduates in "San Francisco State University" in year 2004? | SELECT sum(t1.graduate) FROM discipline_enrollments AS t1 JOIN campuses AS t2 ON t1.campus = t2.id WHERE t1.year = 2004 AND t2.campus = "San Francisco State University" | csu_1 |
[
"What is the location of \"San Francisco State University\"?",
"What are its campus fees over all years?",
"How about in year 2000?"
] | [
"SELECT Location FROM campuses WHERE campus = \"San Francisco State University\"",
"SELECT t1.campusfee FROM csu_fees AS t1 JOIN campuses AS t2 ON t1.campus = t2.id WHERE t2.campus = \"San Francisco State University\"",
"SELECT t1.campusfee FROM csu_fees AS t1 JOIN campuses AS t2 ON t1.campus = t2.id WHERE t2.campus = \"San Francisco State University\" AND t1.year = 2000"
] | What is the campus fee of "San Francisco State University" in year 2000? | SELECT t1.campusfee FROM csu_fees AS t1 JOIN campuses AS t2 ON t1.campus = t2.id WHERE t2.campus = "San Francisco State University" AND t1.year = 2000 | csu_1 |
[
"Show the information for all faculty.",
"How many are there?"
] | [
"SELECT * FROM Faculty",
"SELECT count(*) FROM Faculty"
] | How many faculty do we have? | SELECT count(*) FROM Faculty | activity_1 |
[
"Show the rank for each member of faculty.",
"What different ranks are there?"
] | [
"SELECT rank FROM Faculty",
"SELECT DISTINCT rank FROM Faculty"
] | What ranks do we have for faculty? | SELECT DISTINCT rank FROM Faculty | activity_1 |
[
"Show the building for each faculty member.",
"Show the distinct results among these."
] | [
"SELECT building FROM Faculty",
"SELECT DISTINCT building FROM Faculty"
] | Show all the distinct buildings that have faculty rooms. | SELECT DISTINCT building FROM Faculty | activity_1 |
[
"Show the first name of faculty.",
"Also show the last name for them.",
"Also show the rank for them."
] | [
"SELECT Fname FROM Faculty",
"SELECT Fname , Lname FROM Faculty",
"SELECT rank , Fname , Lname FROM Faculty"
] | Show the rank, first name, and last name for all the faculty. | SELECT rank , Fname , Lname FROM Faculty | activity_1 |
[
"Show the information for all faculty.",
"Filter for female faculty members.",
"Only show the first name, last name, and phone number for them."
] | [
"select * from Faculty",
"select * from Faculty WHERE Sex = 'F'",
"SELECT Fname , Lname , phone FROM Faculty WHERE Sex = 'F'"
] | Show the first name, last name, and phone number for all female faculty members. | SELECT Fname , Lname , phone FROM Faculty WHERE Sex = 'F' | activity_1 |
[
"Show ids for all faculty.",
"Only show the ids for male."
] | [
"SELECT FacID FROM Faculty",
"SELECT FacID FROM Faculty WHERE Sex = 'M'"
] | Show ids for all the male faculty. | SELECT FacID FROM Faculty WHERE Sex = 'M' | activity_1 |
[
"How many faculty are there?",
"What about female ones?",
"What about female professors?"
] | [
"SELECT count(*) FROM Faculty",
"SELECT count(*) FROM Faculty WHERE Sex = 'F'",
"SELECT count(*) FROM Faculty WHERE Sex = 'F' AND Rank = \"Professor\""
] | How many female Professors do we have? | SELECT count(*) FROM Faculty WHERE Sex = 'F' AND Rank = "Professor" | activity_1 |
[
"Show the information for all faculty.",
"Only show the information for the faculty named Jerry Prince.",
"Show the phone, room, and building for this person."
] | [
"select * from Faculty",
"select * from Faculty WHERE Fname = \"Jerry\" AND Lname = \"Prince\"",
"SELECT phone , room , building FROM Faculty WHERE Fname = \"Jerry\" AND Lname = \"Prince\""
] | Show the phone, room, and building for the faculty named Jerry Prince. | SELECT phone , room , building FROM Faculty WHERE Fname = "Jerry" AND Lname = "Prince" | activity_1 |
[
"What is the total count of faculty members?",
"How many are Professors?",
"How many of these are in building NEB?"
] | [
"SELECT count(*) FROM Faculty",
"SELECT count(*) FROM Faculty WHERE Rank = \"Professor\"",
"SELECT count(*) FROM Faculty WHERE Rank = \"Professor\" AND building = \"NEB\""
] | How many Professors are in building NEB? | SELECT count(*) FROM Faculty WHERE Rank = "Professor" AND building = "NEB" | activity_1 |
[
"Show the first name and last name for all faculty.",
"What about those with rank as Instructor?"
] | [
"SELECT fname , lname FROM Faculty",
"SELECT fname , lname FROM Faculty WHERE Rank = \"Instructor\""
] | Show the first name and last name for all the instructors. | SELECT fname , lname FROM Faculty WHERE Rank = "Instructor" | activity_1 |
[
"Show the building for all Faculty.",
"Show how many faculty members each building houses."
] | [
"SELECT building FROM Faculty",
"SELECT building , count(*) FROM Faculty GROUP BY building"
] | Show all the buildings along with the number of faculty members the buildings have. | SELECT building , count(*) FROM Faculty GROUP BY building | activity_1 |
[
"Show the building for all Faculty.",
"Show the number of faculty members for each of those buildings.",
"List them in descending order of the count.",
"Which building has the most?"
] | [
"SELECT building FROM Faculty",
"SELECT building, count(*) FROM Faculty GROUP BY building",
"SELECT building, count(*) FROM Faculty GROUP BY building ORDER BY count(*) DESC",
"SELECT building FROM Faculty GROUP BY building ORDER BY count(*) DESC LIMIT 1"
] | Which building has most faculty members? | SELECT building FROM Faculty GROUP BY building ORDER BY count(*) DESC LIMIT 1 | activity_1 |
[
"Show the building for all Faculty.",
"How about those for professors?",
"For each of the buildings, show the number of professors.",
"Which of them have at least 10?"
] | [
"SELECT building FROM Faculty",
"SELECT building FROM Faculty WHERE rank = \"Professor\"",
"SELECT building, count(*) FROM Faculty WHERE rank = \"Professor\" GROUP BY building",
"SELECT building FROM Faculty WHERE rank = \"Professor\" GROUP BY building HAVING count(*) >= 10"
] | Show all the buildings that have at least 10 professors. | SELECT building FROM Faculty WHERE rank = "Professor" GROUP BY building HAVING count(*) >= 10 | activity_1 |
[
"Show the rank for all faculty members.",
"For each of them, show the number of faculty members."
] | [
"SELECT rank FROM Faculty",
"SELECT rank , count(*) FROM Faculty GROUP BY rank"
] | For each faculty rank, show the number of faculty members who have it. | SELECT rank , count(*) FROM Faculty GROUP BY rank | activity_1 |
[
"Show all rank and sex for each faculty member.",
"Show the counts of faculty grouped by both rank and sex."
] | [
"SELECT rank , sex FROM Faculty",
"SELECT rank , sex , count(*) FROM Faculty GROUP BY rank , sex"
] | Show all the ranks and the number of male and female faculty for each rank. | SELECT rank , sex , count(*) FROM Faculty GROUP BY rank , sex | activity_1 |
[
"Show the rank for all Faculty.",
"For each of them, show the number of faculty members.",
"Order them by the number.",
"Which rank has the smallest number?"
] | [
"SELECT rank FROM Faculty",
"SELECT rank, count(*) FROM Faculty GROUP BY rank",
"SELECT rank FROM Faculty GROUP BY rank ORDER BY count(*)",
"SELECT rank FROM Faculty GROUP BY rank ORDER BY count(*) ASC LIMIT 1"
] | Which rank has the smallest number of faculty members? | SELECT rank FROM Faculty GROUP BY rank ORDER BY count(*) ASC LIMIT 1 | activity_1 |
[
"Show the sex for each Faculty member.",
"Show the result for only assistant professors.",
"How many assistant professors are there of each sex?"
] | [
"SELECT sex FROM Faculty",
"SELECT sex FROM Faculty WHERE rank = \"AsstProf\"",
"SELECT sex , count(*) FROM Faculty WHERE rank = \"AsstProf\" GROUP BY sex"
] | Show the number of male and female assistant professors. | SELECT sex , count(*) FROM Faculty WHERE rank = "AsstProf" GROUP BY sex | activity_1 |
[
"Show the first name and last name for all Faculty.",
"Also show the names of students that each one advises.",
"Who is Linda Smith's advisor?"
] | [
"SELECT fname , lname FROM Faculty",
"SELECT T1.fname , T1.lname, T2.fname , T2.lname FROM Faculty AS T1 JOIN Student AS T2 ON T1.FacID = T2.advisor",
"SELECT T1.fname , T1.lname FROM Faculty AS T1 JOIN Student AS T2 ON T1.FacID = T2.advisor WHERE T2.fname = \"Linda\" AND T2.lname = \"Smith\""
] | What are the first name and last name of Linda Smith's advisor? | SELECT T1.fname , T1.lname FROM Faculty AS T1 JOIN Student AS T2 ON T1.FacID = T2.advisor WHERE T2.fname = "Linda" AND T2.lname = "Smith" | activity_1 |
[
"Show the student ids.",
"Also show the ranks of their advisors.",
"Show the student id for those whose advisors are professors?"
] | [
"SELECT StuID FROM Student",
"SELECT T2.StuID, T1.rank FROM Faculty AS T1 JOIN Student AS T2 ON T1.FacID = T2.advisor",
"SELECT T2.StuID FROM Faculty AS T1 JOIN Student AS T2 ON T1.FacID = T2.advisor WHERE T1.rank = \"Professor\""
] | Show the ids of students whose advisors are professors. | SELECT T2.StuID FROM Faculty AS T1 JOIN Student AS T2 ON T1.FacID = T2.advisor WHERE T1.rank = "Professor" | activity_1 |
[
"Show first name and last name for all the students.",
"Also show their advisor's first name and last name.",
"Who are advised by Michael Goodrich?"
] | [
"SELECT fname , lname FROM Student",
"SELECT T2.fname , T2.lname, T1.fname , T1.lname FROM Faculty AS T1 JOIN Student AS T2 ON T1.FacID = T2.advisor",
"SELECT T2.fname , T2.lname FROM Faculty AS T1 JOIN Student AS T2 ON T1.FacID = T2.advisor WHERE T1.fname = \"Michael\" AND T1.lname = \"Goodrich\""
] | Show first name and last name for all the students advised by Michael Goodrich. | SELECT T2.fname , T2.lname FROM Faculty AS T1 JOIN Student AS T2 ON T1.FacID = T2.advisor WHERE T1.fname = "Michael" AND T1.lname = "Goodrich" | activity_1 |
[
"Show the faculty id of each faculty member",
"For each of them, also show the number of students he or she advises."
] | [
"SELECT FacID from Faculty",
"SELECT T1.FacID , count(*) FROM Faculty AS T1 JOIN Student AS T2 ON T1.FacID = T2.advisor GROUP BY T1.FacID"
] | Show the faculty id of each faculty member, along with the number of students he or she advises. | SELECT T1.FacID , count(*) FROM Faculty AS T1 JOIN Student AS T2 ON T1.FacID = T2.advisor GROUP BY T1.FacID | activity_1 |
[
"Show all the faculty ranks",
"For each of those ranks, show the number of students advised."
] | [
"SELECT rank FROM Faculty",
"SELECT T1.rank , count(*) FROM Faculty AS T1 JOIN Student AS T2 ON T1.FacID = T2.advisor GROUP BY T1.rank"
] | Show all the faculty ranks and the number of students advised by each rank. | SELECT T1.rank , count(*) FROM Faculty AS T1 JOIN Student AS T2 ON T1.FacID = T2.advisor GROUP BY T1.rank | activity_1 |
[
"Show the first and last name of the faculty.",
"For each faculty member, also count the number of students advised.",
"Show the names in descending order of the number.",
"Who has the most?"
] | [
"SELECT fname , lname FROM Faculty",
"SELECT T1.fname , T1.lname, count(*) FROM Faculty AS T1 JOIN Student AS T2 ON T1.FacID = T2.advisor GROUP BY T1.FacID",
"SELECT T1.fname , T1.lname FROM Faculty AS T1 JOIN Student AS T2 ON T1.FacID = T2.advisor GROUP BY T1.FacID ORDER BY count(*) DESC",
"SELECT T1.fname , T1.lname FROM Faculty AS T1 JOIN Student AS T2 ON T1.FacID = T2.advisor GROUP BY T1.FacID ORDER BY count(*) DESC LIMIT 1"
] | What are the first and last name of the faculty who has the most students? | SELECT T1.fname , T1.lname FROM Faculty AS T1 JOIN Student AS T2 ON T1.FacID = T2.advisor GROUP BY T1.FacID ORDER BY count(*) DESC LIMIT 1 | activity_1 |
[
"Show the ids for all the faculty members",
"For each of them, also count the number of students advised.",
"Who have at least 2 students?"
] | [
"SELECT FacID FROM Faculty",
"SELECT T1.FacID, count(*) FROM Faculty AS T1 JOIN Student AS T2 ON T1.FacID = T2.advisor GROUP BY T1.FacID",
"SELECT T1.FacID FROM Faculty AS T1 JOIN Student AS T2 ON T1.FacID = T2.advisor GROUP BY T1.FacID HAVING count(*) >= 2"
] | Show the ids for all the faculty members who have at least 2 students. | SELECT T1.FacID FROM Faculty AS T1 JOIN Student AS T2 ON T1.FacID = T2.advisor GROUP BY T1.FacID HAVING count(*) >= 2 | activity_1 |
[
"Show all faculty members advising a student.",
"Show ids for those who don't."
] | [
"SELECT advisor FROM Student",
"SELECT FacID FROM Faculty EXCEPT SELECT advisor FROM Student"
] | Show ids for the faculty members who don't advise any student. | SELECT FacID FROM Faculty EXCEPT SELECT advisor FROM Student | activity_1 |
[
"Show information for all activities.",
"Show the name for those."
] | [
"SELECT * FROM Activity",
"SELECT activity_name FROM Activity"
] | What activities do we have? | SELECT activity_name FROM Activity | activity_1 |
[
"Show info for all activities.",
"How many are there?"
] | [
"SELECT * FROM Activity",
"SELECT count(*) FROM Activity"
] | How many activities do we have? | SELECT count(*) FROM Activity | activity_1 |
[
"Show the faculty id of members participating in an activity.",
"How many such members are there?"
] | [
"select FacID FROM Faculty_participates_in",
"SELECT count(DISTINCT FacID) FROM Faculty_participates_in"
] | How many faculty members participate in an activity? | SELECT count(DISTINCT FacID) FROM Faculty_participates_in | activity_1 |
[
"Show the ids of the faculty who participate in an activity.",
"Show the ids for those who don't."
] | [
"SELECT FacID FROM Faculty_participates_in",
"SELECT FacID FROM Faculty EXCEPT SELECT FacID FROM Faculty_participates_in"
] | Show the ids of the faculty who don't participate in any activity. | SELECT FacID FROM Faculty EXCEPT SELECT FacID FROM Faculty_participates_in | activity_1 |
[
"Show the ids of all the faculty members who participate in an activity.",
"Show the ids of all the faculty members who advise a student.",
"Show the ids of all the faculty members who do both."
] | [
"SELECT FacID FROM Faculty_participates_in",
"SELECT advisor FROM Student",
"SELECT FacID FROM Faculty_participates_in INTERSECT SELECT advisor FROM Student"
] | Show the ids of all the faculty members who participate in an activity and advise a student. | SELECT FacID FROM Faculty_participates_in INTERSECT SELECT advisor FROM Student | activity_1 |
[
"Show first and last name and activity ids for all faculty participating in activities.",
"How many activities does Mark Giuliano participate in?"
] | [
"SELECT T1.fname, T1.lname, T2.actid FROM Faculty AS T1 JOIN Faculty_participates_in AS T2 ON T1.facID = T2.facID",
"SELECT count(*) FROM Faculty AS T1 JOIN Faculty_participates_in AS T2 ON T1.facID = T2.facID WHERE T1.fname = \"Mark\" AND T1.lname = \"Giuliano\""
] | How many activities does Mark Giuliano participate in? | SELECT count(*) FROM Faculty AS T1 JOIN Faculty_participates_in AS T2 ON T1.facID = T2.facID WHERE T1.fname = "Mark" AND T1.lname = "Giuliano" | activity_1 |
[
"Show the names of all the activities.",
"Show the names of those with faculty participation.",
"What are those activities which Mark Giuliano participates in?"
] | [
"SELECT activity_name FROM Activity",
"SELECT T3.activity_name, T1.fname, T1.lname FROM Faculty AS T1 JOIN Faculty_participates_in AS T2 ON T1.facID = T2.facID JOIN Activity AS T3 ON T3.actid = T2.actid",
"SELECT T3.activity_name FROM Faculty AS T1 JOIN Faculty_participates_in AS T2 ON T1.facID = T2.facID JOIN Activity AS T3 ON T3.actid = T2.actid WHERE T1.fname = \"Mark\" AND T1.lname = \"Giuliano\""
] | Show the names of all the activities Mark Giuliano participates in. | SELECT T3.activity_name FROM Faculty AS T1 JOIN Faculty_participates_in AS T2 ON T1.facID = T2.facID JOIN Activity AS T3 ON T3.actid = T2.actid WHERE T1.fname = "Mark" AND T1.lname = "Giuliano" | activity_1 |
[
"Show the first and last name of all the faculty members.",
"Which of those have participated in some activity?",
"For each of them, also show the number of activities they participated in."
] | [
"SELECT fname , lname FROM Faculty",
"SELECT T1.fname , T1.lname FROM Faculty AS T1 JOIN Faculty_participates_in AS T2 ON T1.facID = T2.facID",
"SELECT T1.fname , T1.lname , count(*) FROM Faculty AS T1 JOIN Faculty_participates_in AS T2 ON T1.facID = T2.facID GROUP BY T1.FacID"
] | Show the first and last name of all the faculty members who participated in some activity, together with the number of activities they participated in. | SELECT T1.fname , T1.lname , count(*) FROM Faculty AS T1 JOIN Faculty_participates_in AS T2 ON T1.facID = T2.facID GROUP BY T1.FacID | activity_1 |
[
"Show all the activity names.",
"For each of them, how many faculty are involved?"
] | [
"SELECT activity_name from Activity",
"SELECT T1.activity_name , count(*) FROM Activity AS T1 JOIN Faculty_participates_in AS T2 ON T1.actID = T2.actID GROUP BY T1.actID"
] | Show all the activity names and the number of faculty involved in each activity. | SELECT T1.activity_name , count(*) FROM Activity AS T1 JOIN Faculty_participates_in AS T2 ON T1.actID = T2.actID GROUP BY T1.actID | activity_1 |
[
"Show the first and last name for all faculty.",
"For each of them, also count the number of activities they participate in.",
"Sort the names in the descending order of this count.",
"Who participates in the most activities?"
] | [
"SELECT fname , lname FROM Faculty",
"SELECT T1.fname , T1.lname, count(*) FROM Faculty AS T1 JOIN Faculty_participates_in AS T2 ON T1.facID = T2.facID GROUP BY T1.FacID",
"SELECT T1.fname , T1.lname FROM Faculty AS T1 JOIN Faculty_participates_in AS T2 ON T1.facID = T2.facID GROUP BY T1.FacID ORDER BY count(*) DESC",
"SELECT T1.fname , T1.lname FROM Faculty AS T1 JOIN Faculty_participates_in AS T2 ON T1.facID = T2.facID GROUP BY T1.FacID ORDER BY count(*) DESC LIMIT 1"
] | What is the first and last name of the faculty participating in the most activities? | SELECT T1.fname , T1.lname FROM Faculty AS T1 JOIN Faculty_participates_in AS T2 ON T1.facID = T2.facID GROUP BY T1.FacID ORDER BY count(*) DESC LIMIT 1 | activity_1 |
[
"Show all activity names.",
"For each of them, also show the number of faculty members involved.",
"Sort the names in the descending order of the faculty counts.",
"Which activity has the most?"
] | [
"SELECT activity_name FROM Activity",
"SELECT T1.activity_name, count(*) FROM Activity AS T1 JOIN Faculty_participates_in AS T2 ON T1.actID = T2.actID GROUP BY T1.actID",
"SELECT T1.activity_name FROM Activity AS T1 JOIN Faculty_participates_in AS T2 ON T1.actID = T2.actID GROUP BY T1.actID ORDER BY count(*) DESC",
"SELECT T1.activity_name FROM Activity AS T1 JOIN Faculty_participates_in AS T2 ON T1.actID = T2.actID GROUP BY T1.actID ORDER BY count(*) DESC LIMIT 1"
] | What is the name of the activity that has the most faculty members involved in? | SELECT T1.activity_name FROM Activity AS T1 JOIN Faculty_participates_in AS T2 ON T1.actID = T2.actID GROUP BY T1.actID ORDER BY count(*) DESC LIMIT 1 | activity_1 |
[
"Show the student ids who participate in an activity.",
"Show the ids of those who don't."
] | [
"SELECT StuID FROM Participates_in",
"SELECT StuID FROM Student EXCEPT SELECT StuID FROM Participates_in"
] | Show the ids of the students who don't participate in any activity. | SELECT StuID FROM Student EXCEPT SELECT StuID FROM Participates_in | activity_1 |
[
"Show the ids for the students who participate in an activity.",
"Among those, who are under 20?"
] | [
"SELECT StuID FROM Participates_in",
"SELECT StuID FROM Participates_in INTERSECT SELECT StuID FROM Student WHERE age < 20"
] | Show the ids for all the students who participate in an activity and are under 20. | SELECT StuID FROM Participates_in INTERSECT SELECT StuID FROM Student WHERE age < 20 | activity_1 |
[
"Show the first and last name of the student.",
"For each of them, count the number of activities.",
"Sort the names in descending order by the number of activities.",
"Who has the most?"
] | [
"SELECT fname , lname FROM Student",
"SELECT T1.fname , T1.lname, count(*) FROM Student AS T1 JOIN Participates_in AS T2 ON T1.StuID = T2.StuID GROUP BY T1.StuID",
"SELECT T1.fname , T1.lname FROM Student AS T1 JOIN Participates_in AS T2 ON T1.StuID = T2.StuID GROUP BY T1.StuID ORDER BY count(*) DESC",
"SELECT T1.fname , T1.lname FROM Student AS T1 JOIN Participates_in AS T2 ON T1.StuID = T2.StuID GROUP BY T1.StuID ORDER BY count(*) DESC LIMIT 1"
] | What is the first and last name of the student participating in the most activities? | SELECT T1.fname , T1.lname FROM Student AS T1 JOIN Participates_in AS T2 ON T1.StuID = T2.StuID GROUP BY T1.StuID ORDER BY count(*) DESC LIMIT 1 | activity_1 |
[
"Show the names of activities.",
"For each of them, also show the number of students.",
"Sort the names in descending order by this number.",
"Which has the most?"
] | [
"SELECT activity_name FROM Activity",
"SELECT T1.activity_name, count(*) FROM Activity AS T1 JOIN Participates_in AS T2 ON T1.actID = T2.actID GROUP BY T1.actID",
"SELECT T1.activity_name FROM Activity AS T1 JOIN Participates_in AS T2 ON T1.actID = T2.actID GROUP BY T1.actID ORDER BY count(*) DESC",
"SELECT T1.activity_name FROM Activity AS T1 JOIN Participates_in AS T2 ON T1.actID = T2.actID GROUP BY T1.actID ORDER BY count(*) DESC LIMIT 1"
] | What is the name of the activity with the most students? | SELECT T1.activity_name FROM Activity AS T1 JOIN Participates_in AS T2 ON T1.actID = T2.actID GROUP BY T1.actID ORDER BY count(*) DESC LIMIT 1 | activity_1 |
[
"Show the first names of the faculty members.",
"Which of them participate in canoeing?",
"How about Kayaking?",
"Show the first names for those participating in either of the two."
] | [
"SELECT fname FROM Faculty",
"SELECT DISTINCT T1.fname FROM Faculty AS T1 JOIN Faculty_participates_in AS T2 ON T1.facID = T2.facID JOIN activity AS T3 ON T2.actid = T2.actid WHERE T3.activity_name = 'Canoeing'",
"SELECT DISTINCT T1.fname FROM Faculty AS T1 JOIN Faculty_participates_in AS T2 ON T1.facID = T2.facID JOIN activity AS T3 ON T2.actid = T2.actid WHERE T3.activity_name = 'Kayaking'",
"SELECT DISTINCT T1.fname FROM Faculty AS T1 JOIN Faculty_participates_in AS T2 ON T1.facID = T2.facID JOIN activity AS T3 ON T2.actid = T2.actid WHERE T3.activity_name = 'Canoeing' OR T3.activity_name = 'Kayaking'"
] | Find the first names of the faculty members who are playing Canoeing or Kayaking. | SELECT DISTINCT T1.fname FROM Faculty AS T1 JOIN Faculty_participates_in AS T2 ON T1.facID = T2.facID JOIN activity AS T3 ON T2.actid = T2.actid WHERE T3.activity_name = 'Canoeing' OR T3.activity_name = 'Kayaking' | activity_1 |
[
"Show the first name of faculty and their activity names.",
"Which of them practice canoeing or kayaking?",
"Which of them do not?",
"Who among these are professors?"
] | [
"SELECT T1.fname, T3.activity_name FROM Faculty AS T1 JOIN Faculty_participates_in AS T2 ON T1.facID = T2.facID JOIN activity AS T3 ON T2.actid = T2.actid",
"SELECT DISTINCT T1.fname FROM Faculty AS T1 JOIN Faculty_participates_in AS T2 ON T1.facID = T2.facID JOIN activity AS T3 ON T2.actid = T2.actid WHERE T3.activity_name = 'Canoeing' OR T3.activity_name = 'Kayaking'",
"SELECT fname FROM faculty EXCEPT SELECT DISTINCT T1.fname FROM Faculty AS T1 JOIN Faculty_participates_in AS T2 ON T1.facID = T2.facID JOIN activity AS T3 ON T2.actid = T2.actid WHERE T3.activity_name = 'Canoeing' OR T3.activity_name = 'Kayaking'",
"SELECT fname FROM faculty WHERE rank = 'Professor' EXCEPT SELECT DISTINCT T1.fname FROM Faculty AS T1 JOIN Faculty_participates_in AS T2 ON T1.facID = T2.facID JOIN activity AS T3 ON T2.actid = T2.actid WHERE T3.activity_name = 'Canoeing' OR T3.activity_name = 'Kayaking'"
] | Find the first names of professors who are not playing Canoeing or Kayaking. | SELECT fname FROM faculty WHERE rank = 'Professor' EXCEPT SELECT DISTINCT T1.fname FROM Faculty AS T1 JOIN Faculty_participates_in AS T2 ON T1.facID = T2.facID JOIN activity AS T3 ON T2.actid = T2.actid WHERE T3.activity_name = 'Canoeing' OR T3.activity_name = 'Kayaking' | activity_1 |
[
"Find the first names of the faculty members",
"Show the activity names for them.",
"Which of them participate in canoeing?",
"Which of them participate in kayaking?",
"Which of them participate in both."
] | [
"SELECT fname FROM Faculty",
"SELECT T1.fname, T3.activity_name FROM Faculty AS T1 JOIN Faculty_participates_in AS T2 ON T1.facID = T2.facID JOIN activity AS T3 ON T2.actid = T2.actid",
"SELECT T1.fname FROM Faculty AS T1 JOIN Faculty_participates_in AS T2 ON T1.facID = T2.facID JOIN activity AS T3 ON T2.actid = T2.actid WHERE T3.activity_name = 'Canoeing'",
"SELECT T1.fname FROM Faculty AS T1 JOIN Faculty_participates_in AS T2 ON T1.facID = T2.facID JOIN activity AS T3 ON T2.actid = T2.actid WHERE T3.activity_name = 'Kayaking'",
"SELECT T1.fname FROM Faculty AS T1 JOIN Faculty_participates_in AS T2 ON T1.facID = T2.facID JOIN activity AS T3 ON T2.actid = T2.actid WHERE T3.activity_name = 'Canoeing' INTERSECT SELECT T1.fname FROM Faculty AS T1 JOIN Faculty_participates_in AS T2 ON T1.facID = T2.facID JOIN activity AS T3 ON T2.actid = T2.actid WHERE T3.activity_name = 'Kayaking'"
] | Find the first names of the faculty members who participate in Canoeing and Kayaking. | SELECT T1.fname FROM Faculty AS T1 JOIN Faculty_participates_in AS T2 ON T1.facID = T2.facID JOIN activity AS T3 ON T2.actid = T2.actid WHERE T3.activity_name = 'Canoeing' INTERSECT SELECT T1.fname FROM Faculty AS T1 JOIN Faculty_participates_in AS T2 ON T1.facID = T2.facID JOIN activity AS T3 ON T2.actid = T2.actid WHERE T3.activity_name = 'Kayaking' | activity_1 |
[
"How many authors are from college \"Florida\"?",
"How about the college \"Temple\"?",
"What is the sum of the number of authors from these two colleges?",
"Please show the authors' names."
] | [
"SELECT COUNT(Author) FROM submission WHERE College = \"Florida\"",
"SELECT COUNT(Author) FROM submission WHERE College = \"Temple\"",
"SELECT COUNT(Author) FROM submission WHERE College = \"Florida\" OR College = \"Temple\"",
"SELECT Author FROM submission WHERE College = \"Florida\" OR College = \"Temple\""
] | Show the names of authors from college "Florida" or "Temple" | SELECT Author FROM submission WHERE College = "Florida" OR College = "Temple" | workshop_paper |
[
"How many authors have sumbitted their work?",
"Please show their names.",
"What is the author of the submission with the lowest score?",
"How about the highest score?"
] | [
"SELECT COUNT(Author) FROM submission",
"SELECT Author FROM submission",
"SELECT Author FROM submission ORDER BY Scores ASC LIMIT 1",
"SELECT Author FROM submission ORDER BY Scores DESC LIMIT 1"
] | What is the author of the submission with the highest score? | SELECT Author FROM submission ORDER BY Scores DESC LIMIT 1 | workshop_paper |
[
"How many authors have sumbitted their work?",
"Please show their colleges.",
"How many unique colleges are there?",
"Among these colleges, which one has the most submissions?"
] | [
"SELECT COUNT(Author) FROM submission",
"SELECT College FROM submission",
"SELECT COUNT(DISTINCT College) FROM submission",
"SELECT College FROM submission GROUP BY College ORDER BY COUNT(*) DESC LIMIT 1"
] | Show the most common college of authors of submissions. | SELECT College FROM submission GROUP BY College ORDER BY COUNT(*) DESC LIMIT 1 | workshop_paper |
[
"What is the largest submission score?",
"How many submissions have a score larger than 90?",
"How about the number of submissions with a score less than 80?",
"What are the colleges that have both authors with submission score larger than 90 and authors with submission score smaller than 80?"
] | [
"SELECT MAX(Scores) FROM submission",
"SELECT COUNT(*) FROM submission WHERE Scores > 90",
"SELECT COUNT(*) FROM submission WHERE Scores < 80",
"SELECT College FROM submission WHERE Scores > 90 INTERSECT SELECT College FROM submission WHERE Scores < 80"
] | Show the colleges that have both authors with submission score larger than 90 and authors with submission score smaller than 80. | SELECT College FROM submission WHERE Scores > 90 INTERSECT SELECT College FROM submission WHERE Scores < 80 | workshop_paper |
[
"How many submissions have been accepted?",
"What is the average submission score of these works?",
"Which submission has the highest score? Show its submission ID.",
"How about its submission result?"
] | [
"SELECT COUNT(*) FROM Acceptance WHERE Result = \"Accepted\"",
"SELECT avg(T2.Scores) FROM acceptance AS T1 JOIN submission AS T2 ON T1.Submission_ID = T2.Submission_ID WHERE T1.Result = \"Accepted\"",
"SELECT T2.Submission_ID FROM acceptance AS T1 JOIN submission AS T2 ON T1.Submission_ID = T2.Submission_ID ORDER BY T2.Scores DESC LIMIT 1",
"SELECT T1.Result FROM acceptance AS T1 JOIN submission AS T2 ON T1.Submission_ID = T2.Submission_ID ORDER BY T2.Scores DESC LIMIT 1"
] | Show the result of the submission with the highest score. | SELECT T1.Result FROM acceptance AS T1 JOIN submission AS T2 ON T1.Submission_ID = T2.Submission_ID ORDER BY T2.Scores DESC LIMIT 1 | workshop_paper |
[
"How many different workshops are there?",
"How many authors are there?",
"Show each author and the number of workshops they submitted to."
] | [
"SELECT COUNT(*) FROM workshop",
"SELECT COUNT(Author) FROM Submission",
"SELECT T2.Author , COUNT(DISTINCT T1.workshop_id) FROM acceptance AS T1 JOIN submission AS T2 ON T1.Submission_ID = T2.Submission_ID GROUP BY T2.Author"
] | Show each author and the number of workshops they submitted to. | SELECT T2.Author , COUNT(DISTINCT T1.workshop_id) FROM acceptance AS T1 JOIN submission AS T2 ON T1.Submission_ID = T2.Submission_ID GROUP BY T2.Author | workshop_paper |
[
"Which workshops happened in New York USA?",
"How many workshops have been held?",
"How many authors have submitted to more than one workshop?",
"Please show their names."
] | [
"SELECT Name FROM workshop WHERE Venue = \"New York USA\"",
"SELECT COUNT(*) FROM workshop",
"SELECT COUNT(DISTINCT T2.Author) FROM acceptance AS T1 JOIN submission AS T2 ON T1.Submission_ID = T2.Submission_ID GROUP BY T2.Author HAVING COUNT(DISTINCT T1.workshop_id) > 1",
"SELECT T2.Author FROM acceptance AS T1 JOIN submission AS T2 ON T1.Submission_ID = T2.Submission_ID GROUP BY T2.Author HAVING COUNT(DISTINCT T1.workshop_id) > 1"
] | Show the authors who have submissions to more than one workshop. | SELECT T2.Author FROM acceptance AS T1 JOIN submission AS T2 ON T1.Submission_ID = T2.Submission_ID GROUP BY T2.Author HAVING COUNT(DISTINCT T1.workshop_id) > 1 | workshop_paper |
[
"List all the information about the tracks.",
"Which names and seatings of the tracks that are opened later than the year 1950 ?",
"What about after the year 2000?",
"Order them by seating."
] | [
"SELECT * FROM track",
"SELECT name , seating FROM track where year_opened > 1950",
"SELECT name , seating FROM track where year_opened > 2000",
"SELECT name , seating FROM track WHERE year_opened > 2000 ORDER BY seating"
] | Show names and seatings, ordered by seating for all tracks opened after 2000. | SELECT name , seating FROM track WHERE year_opened > 2000 ORDER BY seating | race_track |
[
"Order all the tracks by the year of opening, from the most recent to the least recent.",
"Which 4 are the most recent ones? Show the name, location and seating.",
"What about the most recent 1?"
] | [
"SELECT * FROM track ORDER BY year_opened DESC",
"SELECT name , LOCATION , seating FROM track ORDER BY year_opened DESC LIMIT 4",
"SELECT name , LOCATION , seating FROM track ORDER BY year_opened DESC LIMIT 1"
] | What is the name, location and seating for the most recently opened track? | SELECT name , LOCATION , seating FROM track ORDER BY year_opened DESC LIMIT 1 | race_track |
[
"What is the total seating numbers from the track?",
"What about the minimum, maximum, and average?"
] | [
"SELECT sum(seating) FROM track",
"SELECT min(seating) , max(seating) , avg(seating) FROM track"
] | What is the minimum, maximum, and average seating for all tracks. | SELECT min(seating) , max(seating) , avg(seating) FROM track | race_track |
[
"What is the total seating numbers from the track?",
"What about the average value?",
"Which tracks have a higher seating number than that?",
"Only keep the name, location, open year of them."
] | [
"SELECT sum(seating) FROM track",
"SELECT avg(seating) FROM track",
"SELECT * FROM track WHERE seating > (SELECT avg(seating) FROM track)",
"SELECT name , LOCATION , year_opened FROM track WHERE seating > (SELECT avg(seating) FROM track)"
] | Show the name, location, open year for all tracks with a seating higher than the average. | SELECT name , LOCATION , year_opened FROM track WHERE seating > (SELECT avg(seating) FROM track) | race_track |
[
"Show all the classes from the race.",
"For each class, show the number of races for each.",
"How many are there for the class 'GT'?",
"Which one has the most number of races?"
] | [
"SELECT * FROM race",
"SELECT CLASS, count(*) FROM race GROUP BY CLASS",
"SELECT CLASS, count(*) FROM race GROUP BY CLASS having class = 'GT'",
"SELECT CLASS FROM race GROUP BY CLASS ORDER BY count(*) DESC LIMIT 1"
] | What is the race class with most number of races. | SELECT CLASS FROM race GROUP BY CLASS ORDER BY count(*) DESC LIMIT 1 | race_track |
[
"For each class, show the number of races for each.",
"Which race classes have more than 3 races?",
"What about at least two?"
] | [
"SELECT CLASS, count(*) FROM race GROUP BY CLASS",
"SELECT CLASS FROM race GROUP BY CLASS HAVING count(*) > 3",
"SELECT CLASS FROM race GROUP BY CLASS HAVING count(*) >= 2"
] | List the race class with at least two races. | SELECT CLASS FROM race GROUP BY CLASS HAVING count(*) >= 2 | race_track |
[
"How many races has the class 'GT'?",
"What about without that class?",
"What are the track names of them?"
] | [
"SELECT count(*) FROM race where class = 'GT'",
"SELECT count(*) FROM race where class != 'GT'",
"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'"
] | What are the names for tracks without a race in class 'GT'. | 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' | race_track |
[
"What are the names and locations of the tracks?",
"Which names of the tracks have at least one race?",
"What about no races?"
] | [
"SELECT name,location FROM track",
"SELECT name FROM track WHERE track_id IN (SELECT track_id FROM race)",
"SELECT name FROM track WHERE track_id NOT IN (SELECT track_id FROM race)"
] | Show all track names that have had no races. | SELECT name FROM track WHERE track_id NOT IN (SELECT track_id FROM race) | race_track |
[
"What are the names of the tracks for each race?",
"How many races for the track name 'Auto Club Speedway'?",
"For each track name, how many races are there?"
] | [
"SELECT T2.name, T1.name FROM race AS T1 JOIN track AS T2 ON T1.track_id = T2.track_id",
"SELECT T2.name,T1.name, count(*) FROM race AS T1 JOIN track AS T2 ON T1.track_id = T2.track_id GROUP BY T1.track_id having T2.name = 'Auto Club Speedway'",
"SELECT T2.name , count(*) FROM race AS T1 JOIN track AS T2 ON T1.track_id = T2.track_id GROUP BY T1.track_id"
] | Show the name of track and the number of races in each track. | SELECT T2.name , count(*) FROM race AS T1 JOIN track AS T2 ON T1.track_id = T2.track_id GROUP BY T1.track_id | race_track |
[
"What are the names of the tracks for each race?",
"For each track, what is the number of races?",
"Which track name has the most number of races?"
] | [
"SELECT T2.name,T1.name FROM race AS T1 JOIN track AS T2 ON T1.track_id = T2.track_id",
"SELECT T2.name,T1.name, count(*) FROM race AS T1 JOIN track AS T2 ON T1.track_id = T2.track_id GROUP BY T1.track_id",
"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"
] | Show the name of track with most number of races. | 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 | race_track |
[
"What are the names of the tracks for each race?",
"For each track name, how many races for each?",
"How many tracks have at least two races?",
"What about only one race? Show the track name and location?"
] | [
"SELECT T2.name, T1.name FROM race AS T1 JOIN track AS T2 ON T1.track_id = T2.track_id",
"SELECT T2.name , count(*) FROM race AS T1 JOIN track AS T2 ON T1.track_id = T2.track_id GROUP BY T1.track_id",
"SELECT count(*) FROM race AS T1 JOIN track AS T2 ON T1.track_id = T2.track_id GROUP BY T1.track_id HAVING count(*) >= 2",
"SELECT T2.name , T2.location FROM race AS T1 JOIN track AS T2 ON T1.track_id = T2.track_id GROUP BY T1.track_id HAVING count(*) = 1"
] | Show the name and location of track with 1 race. | SELECT T2.name , T2.location FROM race AS T1 JOIN track AS T2 ON T1.track_id = T2.track_id GROUP BY T1.track_id HAVING count(*) = 1 | race_track |
[
"List all the apartment booking records.",
"How many are there in total?"
] | [
"SELECT * FROM Apartment_Bookings",
"SELECT count(*) FROM Apartment_Bookings"
] | How many apartment bookings are there in total? | SELECT count(*) FROM Apartment_Bookings | apartment_rentals |
[
"List all the apartment booking records.",
"How many in total?",
"For each of the record, only show the start dates and end dates."
] | [
"SELECT * FROM Apartment_Bookings",
"SELECT count(*) FROM Apartment_Bookings",
"SELECT booking_start_date , booking_end_date FROM Apartment_Bookings"
] | Show the start dates and end dates of all the apartment bookings. | SELECT booking_start_date , booking_end_date FROM Apartment_Bookings | apartment_rentals |
[
"What are the information about all the apartment buildings",
"How many unique building descriptions are there?",
"Show their details."
] | [
"SELECT * FROM Apartment_Buildings",
"SELECT count(DISTINCT building_description) FROM Apartment_Buildings",
"SELECT DISTINCT building_description FROM Apartment_Buildings"
] | Show all distinct building descriptions. | SELECT DISTINCT building_description FROM Apartment_Buildings | apartment_rentals |
[
"List all the building manager names.",
"How many are manged by \"Brenden\"?",
"What about \"Emma\" ?",
"List the short names of the buildings managed by her."
] | [
"SELECT building_manager FROM Apartment_Buildings",
"SELECT count(building_manager) FROM Apartment_Buildings WHERE building_manager\t = \"Brenden\"",
"SELECT count(building_manager) FROM Apartment_Buildings WHERE building_manager\t = \"Brenden\"",
"SELECT building_short_name FROM Apartment_Buildings WHERE building_manager\t = \"Emma\""
] | Show the short names of the buildings managed by "Emma". | SELECT building_short_name FROM Apartment_Buildings WHERE building_manager = "Emma" | apartment_rentals |
[
"List all the building manager names.",
"How many are manged by \"Emma\"?",
"What about \"Brenden\"?",
"What are the addresses and phones of all the buildings managed by him?"
] | [
"SELECT building_manager FROM Apartment_Buildings",
"SELECT count(building_manager) FROM Apartment_Buildings WHERE building_manager\t = \"Emma\"",
"SELECT count(building_manager) FROM Apartment_Buildings WHERE building_manager\t = \"Brenden\"",
"SELECT building_address , building_phone FROM Apartment_Buildings WHERE building_manager\t = \"Brenden\""
] | Show the addresses and phones of all the buildings managed by "Brenden". | SELECT building_address , building_phone FROM Apartment_Buildings WHERE building_manager = "Brenden" | apartment_rentals |
[
"List all the building full names.",
"Show the ones if there is the full name with \"The Eugene\".",
"What are the building full names which contain the word \"court\"?"
] | [
"SELECT building_full_name FROM Apartment_Buildings",
"SELECT building_full_name FROM Apartment_Buildings WHERE building_full_name LIKE \"The Eugene\"",
"SELECT building_full_name FROM Apartment_Buildings WHERE building_full_name LIKE \"%court%\""
] | What are the building full names that contain the word "court"? | SELECT building_full_name FROM Apartment_Buildings WHERE building_full_name LIKE "%court%" | apartment_rentals |
[
"List the number of bathrooms for each apartment.",
"What is the average number of bathrooms?",
"List the minimum and maximum number."
] | [
"SELECT bathroom_count FROM Apartments",
"SELECT avg(bathroom_count) FROM Apartments",
"SELECT min(bathroom_count) , max(bathroom_count) FROM Apartments"
] | What is the minimum and maximum number of bathrooms of all the apartments? | SELECT min(bathroom_count) , max(bathroom_count) FROM Apartments | apartment_rentals |
[
"List the number of bathrooms for each apartment.",
"What about the minimum and maximum number?",
"How about the average?"
] | [
"SELECT bathroom_count FROM Apartments",
"SELECT min(bathroom_count) , max(bathroom_count) FROM Apartments",
"SELECT avg(bedroom_count) FROM Apartments"
] | What is the average number of bedrooms of all apartments? | SELECT avg(bedroom_count) FROM Apartments | apartment_rentals |
[
"Show the number of rooms with each apartment number in the beginning."
] | [
"SELECT apt_number , room_count FROM Apartments"
] | Return the apartment number and the number of rooms for each apartment. | SELECT apt_number , room_count FROM Apartments | apartment_rentals |
[
"How many type codes are there?",
"For each one, show how many apartments.",
"How many apartments have the type code \"Studio\"?",
"Among those apartments, what is the average number of rooms?"
] | [
"SELECT count(distinct apt_type_code) FROM Apartments",
"SELECT apt_type_code, count(*) FROM Apartments GROUP by apt_type_code",
"SELECT count(*) FROM Apartments WHERE apt_type_code = \"Studio\"",
"SELECT avg(room_count) FROM Apartments WHERE apt_type_code = \"Studio\""
] | What is the average number of rooms of apartments with type code "Studio"? | SELECT avg(room_count) FROM Apartments WHERE apt_type_code = "Studio" | apartment_rentals |
[
"How many type codes are there?",
"For each type code, show how many apartments.",
"What are the apartment numbers of the apartments with type code \"Studio\"?",
"What about type code \"Flat\"?"
] | [
"SELECT count(distinct apt_type_code) FROM Apartments",
"SELECT apt_type_code, count(*) FROM Apartments GROUP by apt_type_code",
"SELECT apt_number FROM Apartments WHERE apt_type_code = \"Studio\"",
"SELECT apt_number FROM Apartments WHERE apt_type_code = \"Flat\""
] | Return the apartment numbers of the apartments with type code "Flat". | SELECT apt_number FROM Apartments WHERE apt_type_code = "Flat" | apartment_rentals |
[
"How many guests are there?",
"Keep the first and last names of them."
] | [
"SELECT count(*) FROM Guests",
"SELECT guest_first_name , guest_last_name FROM Guests"
] | Return the first names and last names of all guests | SELECT guest_first_name , guest_last_name FROM Guests | apartment_rentals |
[
"How many female guests are there?",
"What about male?",
"What are the date of birth of them?"
] | [
"SELECT count(*) FROM Guests WHERE gender_code = \"Female\"",
"SELECT count(*) FROM Guests WHERE gender_code = \"Male\"",
"SELECT date_of_birth FROM Guests WHERE gender_code = \"Male\""
] | Return the date of birth for all the guests with gender code "Male". | SELECT date_of_birth FROM Guests WHERE gender_code = "Male" | apartment_rentals |
[
"For each apartment booking, show the start date, and end date.",
"Also show the apartment numbers with each record."
] | [
"SELECT booking_start_date , booking_start_date FROM Apartment_Bookings",
"SELECT T2.apt_number , T1.booking_start_date , T1.booking_start_date FROM Apartment_Bookings AS T1 JOIN Apartments AS T2 ON T1.apt_id = T2.apt_id"
] | Show the apartment numbers, start dates, and end dates of all the apartment bookings. | SELECT T2.apt_number , T1.booking_start_date , T1.booking_start_date FROM Apartment_Bookings AS T1 JOIN Apartments AS T2 ON T1.apt_id = T2.apt_id | apartment_rentals |
[
"For each apartment booking, show the start date, and end date.",
"Also show the type code with each record.",
"What are the booking start and end dates of the apartments with type code \"Studio\"?",
"How about the type code \"Duplex\"?"
] | [
"SELECT booking_start_date , booking_start_date FROM Apartment_Bookings",
"SELECT T2.apt_type_code , T1.booking_start_date , T1.booking_start_date FROM Apartment_Bookings AS T1 JOIN Apartments AS T2 ON T1.apt_id = T2.apt_id",
"SELECT T1.booking_start_date , T1.booking_start_date FROM Apartment_Bookings AS T1 JOIN Apartments AS T2 ON T1.apt_id = T2.apt_id WHERE T2.apt_type_code = \"Studio\"",
"SELECT T1.booking_start_date , T1.booking_start_date FROM Apartment_Bookings AS T1 JOIN Apartments AS T2 ON T1.apt_id = T2.apt_id WHERE T2.apt_type_code = \"Duplex\""
] | What are the booking start and end dates of the apartments with type code "Duplex"? | SELECT T1.booking_start_date , T1.booking_start_date FROM Apartment_Bookings AS T1 JOIN Apartments AS T2 ON T1.apt_id = T2.apt_id WHERE T2.apt_type_code = "Duplex" | apartment_rentals |
[
"List all the booking start and end dates.",
"Also show the bedroom number of each record.",
"Keep the ones that have 3 bedrooms, show the booking start and end dates only?",
"What about more than 2 bedrooms?"
] | [
"SELECT booking_start_date , booking_start_date FROM Apartment_Bookings",
"SELECT T1.booking_start_date , T1.booking_start_date, T2.bedroom_count FROM Apartment_Bookings AS T1 JOIN Apartments AS T2 ON T1.apt_id = T2.apt_id",
"SELECT T1.booking_start_date , T1.booking_start_date FROM Apartment_Bookings AS T1 JOIN Apartments AS T2 ON T1.apt_id = T2.apt_id WHERE T2.bedroom_count = 3",
"SELECT T1.booking_start_date , T1.booking_start_date FROM Apartment_Bookings AS T1 JOIN Apartments AS T2 ON T1.apt_id = T2.apt_id WHERE T2.bedroom_count > 2"
] | What are the booking start and end dates of the apartments with more than 2 bedrooms? | SELECT T1.booking_start_date , T1.booking_start_date FROM Apartment_Bookings AS T1 JOIN Apartments AS T2 ON T1.apt_id = T2.apt_id WHERE T2.bedroom_count > 2 | apartment_rentals |
[
"List all the unique booking status codes.",
"How many are there?",
"Show these codes with apartment numbers.",
"What is the code of the apartment with apartment number \"Suite 634\"?"
] | [
"SELECT distinct booking_status_code FROM Apartment_Bookings",
"SELECT count(distinct booking_status_code) FROM Apartment_Bookings",
"SELECT T1.booking_status_code, T2.apt_number FROM Apartment_Bookings AS T1 JOIN Apartments AS T2 ON T1.apt_id = T2.apt_id",
"SELECT T1.booking_status_code FROM Apartment_Bookings AS T1 JOIN Apartments AS T2 ON T1.apt_id = T2.apt_id WHERE T2.apt_number = \"Suite 634\""
] | What is the booking status code of the apartment with apartment number "Suite 634"? | SELECT T1.booking_status_code FROM Apartment_Bookings AS T1 JOIN Apartments AS T2 ON T1.apt_id = T2.apt_id WHERE T2.apt_number = "Suite 634" | apartment_rentals |
[
"How many rooms are there in total?",
"What about apartments?",
"Show all the apartment numbers and the status code for each one.",
"Show the distinct apartment numbers of the apartments where the status code is not \"Confirmed\".",
"How about the status code is \"Confirmed\"."
] | [
"SELECT sum(room_count) FROM Apartments",
"SELECT count(*) FROM Apartments",
"SELECT T2.apt_number, T1.booking_status_code FROM Apartment_Bookings AS T1 JOIN Apartments AS T2 ON T1.apt_id = T2.apt_id",
"SELECT DISTINCT T2.apt_number FROM Apartment_Bookings AS T1 JOIN Apartments AS T2 ON T1.apt_id = T2.apt_id WHERE T1.booking_status_code != \"Confirmed\"",
"SELECT DISTINCT T2.apt_number FROM Apartment_Bookings AS T1 JOIN Apartments AS T2 ON T1.apt_id = T2.apt_id WHERE T1.booking_status_code = \"Confirmed\""
] | Show the distinct apartment numbers of the apartments that have bookings with status code "Confirmed". | SELECT DISTINCT T2.apt_number FROM Apartment_Bookings AS T1 JOIN Apartments AS T2 ON T1.apt_id = T2.apt_id WHERE T1.booking_status_code = "Confirmed" | apartment_rentals |
[
"How many rooms are there in total?",
"Show all the booking status codes and number of apartments for each.",
"What about the average room count of the apartments that have booking status code \"Confirmed\"?",
"What about the booking status code \"Provisional\"?"
] | [
"SELECT sum(room_count) FROM Apartments",
"SELECT booking_status_code, COUNT(*) FROM Apartment_Bookings GROUP BY booking_status_code",
"SELECT avg(room_count) FROM Apartment_Bookings AS T1 JOIN Apartments AS T2 ON T1.apt_id = T2.apt_id WHERE T1.booking_status_code = \"Confirmed\"",
"SELECT avg(room_count) FROM Apartment_Bookings AS T1 JOIN Apartments AS T2 ON T1.apt_id = T2.apt_id WHERE T1.booking_status_code = \"Provisional\""
] | Show the average room count of the apartments that have booking status code "Provisional". | SELECT avg(room_count) FROM Apartment_Bookings AS T1 JOIN Apartments AS T2 ON T1.apt_id = T2.apt_id WHERE T1.booking_status_code = "Provisional" | apartment_rentals |