aherntech/sparc huggingface dataset:
Database: local_govt_mdm
Question sequence:
Show me the detail of all the customer master indices.
Show me the id of those whose detial is not 'Schmidt, Kertzmann and Lubowitz'.
What are the renting arears tax ids related to them?
SQL query sequence:
SELECT cmi_details FROM Customer_Master_Index
SELECT master_customer_id FROM Customer_Master_Index WHERE cmi_details != 'Schmidt ,  Kertzmann and Lubowitz'
SELECT T1.council_tax_id FROM Rent_Arrears AS T1 JOIN CMI_Cross_References AS T2 ON T1.cmi_cross_ref_id  =  T2.cmi_cross_ref_id JOIN Customer_Master_Index AS T3 ON T3.master_customer_id  =  T2.master_customer_id WHERE T3.cmi_details != 'Schmidt ,  Kertzmann and Lubowitz'
Final question: What are the renting arrears tax ids related to the customer master index whose detail is not 'Schmidt, Kertzmann and Lubowitz'?
Final SQL: SELECT T1.council_tax_id FROM Rent_Arrears AS T1 JOIN CMI_Cross_References AS T2 ON T1.cmi_cross_ref_id  =  T2.cmi_cross_ref_id JOIN Customer_Master_Index AS T3 ON T3.master_customer_id  =  T2.master_customer_id WHERE T3.cmi_details != 'Schmidt ,  Kertzmann and Lubowitz'
Database: local_govt_mdm
Question sequence:
What are the ids of all the electoral register?
What about their cross reference source system codes?
Show me those with source system code 'Electoral' or 'Tax'.
SQL query sequence:
SELECT electoral_register_id FROM Electoral_Register
SELECT T1.electoral_register_id, T2.source_system_code FROM Electoral_Register AS T1 JOIN CMI_Cross_References AS T2 ON T1.cmi_cross_ref_id  =  T2.cmi_cross_ref_id
SELECT T1.electoral_register_id FROM Electoral_Register AS T1 JOIN CMI_Cross_References AS T2 ON T1.cmi_cross_ref_id  =  T2.cmi_cross_ref_id WHERE T2.source_system_code  =  'Electoral' OR T2.source_system_code  =  'Tax'
Final question: What are the register ids of electoral registries that have the cross reference source system code 'Electoral' or 'Tax'?
Final SQL: SELECT T1.electoral_register_id FROM Electoral_Register AS T1 JOIN CMI_Cross_References AS T2 ON T1.cmi_cross_ref_id  =  T2.cmi_cross_ref_id WHERE T2.source_system_code  =  'Electoral' OR T2.source_system_code  =  'Tax'
Database: local_govt_mdm
Question sequence:
What are the details of all the master customers?
Show me the id of one with details 'Gottlieb, Becker and Wyman'.
Show me the distinct cross reference source system codes related to it.
SQL query sequence:
SELECT cmi_details FROM customer_master_index
SELECT master_customer_id FROM customer_master_index WHERE cmi_details  =  'Gottlieb, Becker and Wyman'
SELECT DISTINCT T2.source_system_code FROM customer_master_index AS T1 JOIN cmi_cross_references AS T2 ON T1.master_customer_id  =  T2.master_customer_id WHERE T1.cmi_details  =  'Gottlieb, Becker and Wyman'
Final question: What are the distinct cross reference source system codes which are related to the master customer details 'Gottlieb, Becker and Wyman'?
Final SQL: SELECT DISTINCT T2.source_system_code FROM customer_master_index AS T1 JOIN cmi_cross_references AS T2 ON T1.master_customer_id  =  T2.master_customer_id WHERE T1.cmi_details  =  'Gottlieb, Becker and Wyman'
Database: local_govt_mdm
Question sequence:
Show me all the cmi cross reference ids.
What about those not related to any parking taxes?
SQL query sequence:
SELECT cmi_cross_ref_id FROM cmi_cross_references
SELECT cmi_cross_ref_id FROM cmi_cross_references EXCEPT SELECT cmi_cross_ref_id FROM parking_fines
Final question: Which cmi cross reference id is not related to any parking taxes?
Final SQL: SELECT cmi_cross_ref_id FROM cmi_cross_references EXCEPT SELECT cmi_cross_ref_id FROM parking_fines
Database: csu_1
Question sequence:
How many campuses opened after 1935?
Among these campuses, how many of them opened before 1939?
Show its name.
SQL query sequence:
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
Final question: Which campus was opened between 1935 and 1939?
Final SQL: SELECT campus FROM campuses WHERE YEAR  >=  1935 AND YEAR  <=  1939
Database: csu_1
Question sequence:
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.
SQL query sequence:
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"
Final question: Find the name of the campuses that is in Northridge, Los Angeles or in San Francisco, San Francisco.
Final SQL: SELECT campus FROM campuses WHERE LOCATION  =  "Northridge" AND county  =  "Los Angeles" UNION SELECT campus FROM campuses WHERE LOCATION  =  "San Francisco" AND county  =  "San Francisco"
Database: csu_1
Question sequence:
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?
SQL query sequence:
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
Final question: What is the campus fee of "San Jose State University" in year 1996?
Final SQL: 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
Database: csu_1
Question sequence:
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"?
SQL query sequence:
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
Final question: What is the campus fee of "San Francisco State University" in year 1996?
Final SQL: 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
Database: csu_1
Question sequence:
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?
SQL query sequence:
SELECT MAX(campusfee) FROM csu_fees
SELECT count(*) FROM csu_fees
SELECT count(*) FROM csu_fees WHERE campusfee  >  (SELECT avg(campusfee) FROM csu_fees)
Final question: Find the count of universities whose campus fee is greater than the average campus fee.
Final SQL: SELECT count(*) FROM csu_fees WHERE campusfee  >  (SELECT avg(campusfee) FROM csu_fees)
Database: csu_1
Question sequence:
How many universities are in Los Angeles?
How many of them opened after 1950?
Please show their names.
SQL query sequence:
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
Final question: Which university is in Los Angeles county and opened after 1950?
Final SQL: SELECT campus FROM campuses WHERE county  =  "Los Angeles" AND YEAR  >  1950
Database: csu_1
Question sequence:
What is the total number of degrees conferred?
How many degrees are conferred in each year?
Which year has the most degrees conferred?
SQL query sequence:
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
Final question: Which year has the most degrees conferred?
Final SQL: SELECT YEAR FROM degrees GROUP BY YEAR ORDER BY sum(degrees) DESC LIMIT 1
Database: csu_1
Question sequence:
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?
SQL query sequence:
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
Final question: Which campus has the most degrees conferred in all times?
Final SQL: SELECT campus FROM degrees GROUP BY campus ORDER BY sum(degrees) DESC LIMIT 1
Database: csu_1
Question sequence:
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?
SQL query sequence:
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
Final question: Which campus has the most faculties in year 2003?
Final SQL: 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
Database: csu_1
Question sequence:
How many different campuses are there?
How many degrees are granted in each campus over all years?
How about between 1998 and 2002?
SQL query sequence:
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
Final question: report the total number of degrees granted between 1998 and 2002 in each campus.
Final SQL: 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
Database: csu_1
Question sequence:
How many campuses are in Orange county?
How many degrees have these campuses granted over all years?
How about the number after year 2000?
SQL query sequence:
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
Final question: For each Orange county campus, report the number of degrees granted after 2000.
Final SQL: 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
Database: csu_1
Question sequence:
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?
SQL query sequence:
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")
Final question: Find the names of the campus which has more faculties in 2002 than every campus in Orange county.
Final SQL: 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")
Database: csu_1
Question sequence:
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?
SQL query sequence:
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
Final question: What campus had more than 400 total enrollment but more than 200 full time enrollment in year 1956?
Final SQL: 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
Database: csu_1
Question sequence:
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?
SQL query sequence:
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
Final question: How many degrees were conferred in "San Jose State University" in 2000?
Final SQL: 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
Database: csu_1
Question sequence:
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?
SQL query sequence:
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"
Final question: What is the number of faculty lines in campus "Long Beach State University" in 2002?
Final SQL: 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"
Database: csu_1
Question sequence:
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.
SQL query sequence:
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
Final question: List the campus that have between 600 and 1000 faculty lines in year 2004.
Final SQL: 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
Database: csu_1
Question sequence:
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?
SQL query sequence:
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
Final question: How many faculty lines are there in the university that conferred the most number of degrees in year 2002?
Final SQL: 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
Database: csu_1
Question sequence:
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?
SQL query sequence:
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"
Final question: How many undergraduates are there in "San Jose State University" in year 2004?
Final SQL: 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"
Database: csu_1
Question sequence:
Which county is "San Francisco State University" located?
How many graduates were there in this university in year 2003?
How about in 2004?
SQL query sequence:
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"
Final question: What is the number of graduates in "San Francisco State University" in year 2004?
Final SQL: 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"
Database: csu_1
Question sequence:
What is the location of "San Francisco State University"?
What are its campus fees over all years?
How about in year 2000?
SQL query sequence:
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
Final question: What is the campus fee of "San Francisco State University" in year 2000?
Final SQL: 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
Database: activity_1
Question sequence:
Show the information for all faculty.
How many are there?
SQL query sequence:
SELECT * FROM Faculty
SELECT count(*) FROM Faculty
Final question: How many faculty do we have?
Final SQL: SELECT count(*) FROM Faculty
Database: activity_1
Question sequence:
Show the rank for each member of faculty.
What different ranks are there?
SQL query sequence:
SELECT rank FROM Faculty
SELECT DISTINCT rank FROM Faculty
Final question: What ranks do we have for faculty?
Final SQL: SELECT DISTINCT rank FROM Faculty
Database: activity_1
Question sequence:
Show the building for each faculty member.
Show the distinct results among these.
SQL query sequence:
SELECT building FROM Faculty
SELECT DISTINCT building FROM Faculty
Final question: Show all the distinct buildings that have faculty rooms.
Final SQL: SELECT DISTINCT building FROM Faculty
Database: activity_1
Question sequence:
Show the first name of faculty.
Also show the last name for them.
Also show the rank for them.
SQL query sequence:
SELECT Fname FROM Faculty
SELECT Fname ,  Lname FROM Faculty
SELECT rank ,  Fname ,  Lname FROM Faculty
Final question: Show the rank, first name, and last name for all the faculty.
Final SQL: SELECT rank ,  Fname ,  Lname FROM Faculty
Database: activity_1
Question sequence:
Show the information for all faculty.
Filter for female faculty members.
Only show the first name, last name, and phone number for them.
SQL query sequence:
select * from Faculty
select * from Faculty WHERE Sex  =  'F'
SELECT Fname ,  Lname ,  phone FROM Faculty WHERE Sex  =  'F'
Final question: Show the first name, last name, and phone number for all female faculty members.
Final SQL: SELECT Fname ,  Lname ,  phone FROM Faculty WHERE Sex  =  'F'
Database: activity_1
Question sequence:
Show ids for all faculty.
Only show the ids for male.
SQL query sequence:
SELECT FacID FROM Faculty
SELECT FacID FROM Faculty WHERE Sex  =  'M'
Final question: Show ids for all the male faculty.
Final SQL: SELECT FacID FROM Faculty WHERE Sex  =  'M'
Database: activity_1
Question sequence:
How many faculty are there?
What about female ones?
What about female professors?
SQL query sequence:
SELECT count(*) FROM Faculty
SELECT count(*) FROM Faculty WHERE Sex  =  'F'
SELECT count(*) FROM Faculty WHERE Sex  =  'F' AND Rank  =  "Professor"
Final question: How many female Professors do we have?
Final SQL: SELECT count(*) FROM Faculty WHERE Sex  =  'F' AND Rank  =  "Professor"
Database: activity_1
Question sequence:
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.
SQL query sequence:
select * from Faculty
select * from Faculty WHERE Fname  =  "Jerry" AND Lname  =  "Prince"
SELECT phone ,  room ,  building FROM Faculty WHERE Fname  =  "Jerry" AND Lname  =  "Prince"
Final question: Show the phone, room, and building for the faculty named Jerry Prince.
Final SQL: SELECT phone ,  room ,  building FROM Faculty WHERE Fname  =  "Jerry" AND Lname  =  "Prince"
Database: activity_1
Question sequence:
What is the total count of faculty members?
How many are Professors?
How many of these are in building NEB?
SQL query sequence:
SELECT count(*) FROM Faculty
SELECT count(*) FROM Faculty WHERE Rank  =  "Professor"
SELECT count(*) FROM Faculty WHERE Rank  =  "Professor" AND building  =  "NEB"
Final question: How many Professors are in building NEB?
Final SQL: SELECT count(*) FROM Faculty WHERE Rank  =  "Professor" AND building  =  "NEB"