SQL
stringlengths 18
577
| question
stringlengths 317
11.5k
|
---|---|
SELECT count(*) FROM perpetrator
|
Given the Table perpetrator having columns as Perpetrator_ID has datatype number, People_ID has datatype number, Date has datatype text, Year has datatype number, Location has datatype text, Country has datatype text, Killed has datatype number, Injured has datatype number which has Perpetrator_ID and Given the Table people having columns as People_ID has datatype number, Name has datatype text, Height has datatype number, Weight has datatype number, Home Town has datatype text which has People_ID. Answer the question by writing the appropriate SQL code. How many perpetrators are there?
|
SELECT Date FROM perpetrator ORDER BY Killed DESC
|
Given the Table perpetrator having columns as Perpetrator_ID has datatype number, People_ID has datatype number, Date has datatype text, Year has datatype number, Location has datatype text, Country has datatype text, Killed has datatype number, Injured has datatype number which has Perpetrator_ID and Given the Table people having columns as People_ID has datatype number, Name has datatype text, Height has datatype number, Weight has datatype number, Home Town has datatype text which has People_ID. Answer the question by writing the appropriate SQL code. List the date of perpetrators in descending order of the number of people killed.
|
SELECT Injured FROM perpetrator ORDER BY Injured ASC
|
Given the Table perpetrator having columns as Perpetrator_ID has datatype number, People_ID has datatype number, Date has datatype text, Year has datatype number, Location has datatype text, Country has datatype text, Killed has datatype number, Injured has datatype number which has Perpetrator_ID and Given the Table people having columns as People_ID has datatype number, Name has datatype text, Height has datatype number, Weight has datatype number, Home Town has datatype text which has People_ID. Answer the question by writing the appropriate SQL code. List the number of people injured by perpetrators in ascending order.
|
SELECT avg(Injured) FROM perpetrator
|
Given the Table perpetrator having columns as Perpetrator_ID has datatype number, People_ID has datatype number, Date has datatype text, Year has datatype number, Location has datatype text, Country has datatype text, Killed has datatype number, Injured has datatype number which has Perpetrator_ID and Given the Table people having columns as People_ID has datatype number, Name has datatype text, Height has datatype number, Weight has datatype number, Home Town has datatype text which has People_ID. Answer the question by writing the appropriate SQL code. What is the average number of people injured by all perpetrators?
|
SELECT LOCATION FROM perpetrator ORDER BY Killed DESC LIMIT 1
|
Given the Table perpetrator having columns as Perpetrator_ID has datatype number, People_ID has datatype number, Date has datatype text, Year has datatype number, Location has datatype text, Country has datatype text, Killed has datatype number, Injured has datatype number which has Perpetrator_ID and Given the Table people having columns as People_ID has datatype number, Name has datatype text, Height has datatype number, Weight has datatype number, Home Town has datatype text which has People_ID. Answer the question by writing the appropriate SQL code. What is the location of the perpetrator with the largest kills.
|
SELECT Name FROM People ORDER BY Height ASC
|
Given the Table perpetrator having columns as Perpetrator_ID has datatype number, People_ID has datatype number, Date has datatype text, Year has datatype number, Location has datatype text, Country has datatype text, Killed has datatype number, Injured has datatype number which has Perpetrator_ID and Given the Table people having columns as People_ID has datatype number, Name has datatype text, Height has datatype number, Weight has datatype number, Home Town has datatype text which has People_ID. Answer the question by writing the appropriate SQL code. What are the names of people in ascending order of height?
|
SELECT T1.Name FROM people AS T1 JOIN perpetrator AS T2 ON T1.People_ID = T2.People_ID
|
Given the Table perpetrator having columns as Perpetrator_ID has datatype number, People_ID has datatype number, Date has datatype text, Year has datatype number, Location has datatype text, Country has datatype text, Killed has datatype number, Injured has datatype number which has Perpetrator_ID and Given the Table people having columns as People_ID has datatype number, Name has datatype text, Height has datatype number, Weight has datatype number, Home Town has datatype text which has People_ID. Answer the question by writing the appropriate SQL code. What are the names of perpetrators?
|
SELECT T1.Name FROM people AS T1 JOIN perpetrator AS T2 ON T1.People_ID = T2.People_ID WHERE T2.Country != "China"
|
Given the Table perpetrator having columns as Perpetrator_ID has datatype number, People_ID has datatype number, Date has datatype text, Year has datatype number, Location has datatype text, Country has datatype text, Killed has datatype number, Injured has datatype number which has Perpetrator_ID and Given the Table people having columns as People_ID has datatype number, Name has datatype text, Height has datatype number, Weight has datatype number, Home Town has datatype text which has People_ID. Answer the question by writing the appropriate SQL code. What are the names of perpetrators whose country is not "China"?
|
SELECT T1.Name FROM people AS T1 JOIN perpetrator AS T2 ON T1.People_ID = T2.People_ID ORDER BY T1.Weight DESC LIMIT 1
|
Given the Table perpetrator having columns as Perpetrator_ID has datatype number, People_ID has datatype number, Date has datatype text, Year has datatype number, Location has datatype text, Country has datatype text, Killed has datatype number, Injured has datatype number which has Perpetrator_ID and Given the Table people having columns as People_ID has datatype number, Name has datatype text, Height has datatype number, Weight has datatype number, Home Town has datatype text which has People_ID. Answer the question by writing the appropriate SQL code. What is the name of the perpetrator with the biggest weight.
|
SELECT sum(T2.Killed) FROM people AS T1 JOIN perpetrator AS T2 ON T1.People_ID = T2.People_ID WHERE T1.Height > 1.84
|
Given the Table perpetrator having columns as Perpetrator_ID has datatype number, People_ID has datatype number, Date has datatype text, Year has datatype number, Location has datatype text, Country has datatype text, Killed has datatype number, Injured has datatype number which has Perpetrator_ID and Given the Table people having columns as People_ID has datatype number, Name has datatype text, Height has datatype number, Weight has datatype number, Home Town has datatype text which has People_ID. Answer the question by writing the appropriate SQL code. What is the total kills of the perpetrators with height more than 1.84.
|
SELECT T1.Name FROM people AS T1 JOIN perpetrator AS T2 ON T1.People_ID = T2.People_ID WHERE T2.Country = "China" OR T2.Country = "Japan"
|
Given the Table perpetrator having columns as Perpetrator_ID has datatype number, People_ID has datatype number, Date has datatype text, Year has datatype number, Location has datatype text, Country has datatype text, Killed has datatype number, Injured has datatype number which has Perpetrator_ID and Given the Table people having columns as People_ID has datatype number, Name has datatype text, Height has datatype number, Weight has datatype number, Home Town has datatype text which has People_ID. Answer the question by writing the appropriate SQL code. What are the names of perpetrators in country "China" or "Japan"?
|
SELECT T1.Height FROM people AS T1 JOIN perpetrator AS T2 ON T1.People_ID = T2.People_ID ORDER BY T2.Injured DESC
|
Given the Table perpetrator having columns as Perpetrator_ID has datatype number, People_ID has datatype number, Date has datatype text, Year has datatype number, Location has datatype text, Country has datatype text, Killed has datatype number, Injured has datatype number which has Perpetrator_ID and Given the Table people having columns as People_ID has datatype number, Name has datatype text, Height has datatype number, Weight has datatype number, Home Town has datatype text which has People_ID. Answer the question by writing the appropriate SQL code. What are the heights of perpetrators in descending order of the number of people they injured?
|
SELECT Country , COUNT(*) FROM perpetrator GROUP BY Country
|
Given the Table perpetrator having columns as Perpetrator_ID has datatype number, People_ID has datatype number, Date has datatype text, Year has datatype number, Location has datatype text, Country has datatype text, Killed has datatype number, Injured has datatype number which has Perpetrator_ID and Given the Table people having columns as People_ID has datatype number, Name has datatype text, Height has datatype number, Weight has datatype number, Home Town has datatype text which has People_ID. Answer the question by writing the appropriate SQL code. What are the countries of perpetrators? Show each country and the corresponding number of perpetrators there.
|
SELECT Country , COUNT(*) FROM perpetrator GROUP BY Country ORDER BY COUNT(*) DESC LIMIT 1
|
Given the Table perpetrator having columns as Perpetrator_ID has datatype number, People_ID has datatype number, Date has datatype text, Year has datatype number, Location has datatype text, Country has datatype text, Killed has datatype number, Injured has datatype number which has Perpetrator_ID and Given the Table people having columns as People_ID has datatype number, Name has datatype text, Height has datatype number, Weight has datatype number, Home Town has datatype text which has People_ID. Answer the question by writing the appropriate SQL code. What is the country that has the most perpetrators?
|
SELECT Country , COUNT(*) FROM perpetrator GROUP BY Country HAVING COUNT(*) >= 2
|
Given the Table perpetrator having columns as Perpetrator_ID has datatype number, People_ID has datatype number, Date has datatype text, Year has datatype number, Location has datatype text, Country has datatype text, Killed has datatype number, Injured has datatype number which has Perpetrator_ID and Given the Table people having columns as People_ID has datatype number, Name has datatype text, Height has datatype number, Weight has datatype number, Home Town has datatype text which has People_ID. Answer the question by writing the appropriate SQL code. What are the countries that have at least two perpetrators?
|
SELECT T1.Name FROM people AS T1 JOIN perpetrator AS T2 ON T1.People_ID = T2.People_ID ORDER BY T2.Year DESC
|
Given the Table perpetrator having columns as Perpetrator_ID has datatype number, People_ID has datatype number, Date has datatype text, Year has datatype number, Location has datatype text, Country has datatype text, Killed has datatype number, Injured has datatype number which has Perpetrator_ID and Given the Table people having columns as People_ID has datatype number, Name has datatype text, Height has datatype number, Weight has datatype number, Home Town has datatype text which has People_ID. Answer the question by writing the appropriate SQL code. List the names of perpetrators in descending order of the year.
|
SELECT Name FROM people WHERE People_ID NOT IN (SELECT People_ID FROM perpetrator)
|
Given the Table perpetrator having columns as Perpetrator_ID has datatype number, People_ID has datatype number, Date has datatype text, Year has datatype number, Location has datatype text, Country has datatype text, Killed has datatype number, Injured has datatype number which has Perpetrator_ID and Given the Table people having columns as People_ID has datatype number, Name has datatype text, Height has datatype number, Weight has datatype number, Home Town has datatype text which has People_ID. Answer the question by writing the appropriate SQL code. List the names of people that are not perpetrators.
|
SELECT Country FROM perpetrator WHERE Injured > 50 INTERSECT SELECT Country FROM perpetrator WHERE Injured < 20
|
Given the Table perpetrator having columns as Perpetrator_ID has datatype number, People_ID has datatype number, Date has datatype text, Year has datatype number, Location has datatype text, Country has datatype text, Killed has datatype number, Injured has datatype number which has Perpetrator_ID and Given the Table people having columns as People_ID has datatype number, Name has datatype text, Height has datatype number, Weight has datatype number, Home Town has datatype text which has People_ID. Answer the question by writing the appropriate SQL code. Show the countries that have both perpetrators with injures more than 50 and perpetrators with injures smaller than 20.
|
SELECT count(DISTINCT LOCATION) FROM perpetrator
|
Given the Table perpetrator having columns as Perpetrator_ID has datatype number, People_ID has datatype number, Date has datatype text, Year has datatype number, Location has datatype text, Country has datatype text, Killed has datatype number, Injured has datatype number which has Perpetrator_ID and Given the Table people having columns as People_ID has datatype number, Name has datatype text, Height has datatype number, Weight has datatype number, Home Town has datatype text which has People_ID. Answer the question by writing the appropriate SQL code. How many distinct locations of perpetrators are there?
|
SELECT T2.Date FROM people AS T1 JOIN perpetrator AS T2 ON T1.People_ID = T2.People_ID ORDER BY T1.Height DESC LIMIT 1
|
Given the Table perpetrator having columns as Perpetrator_ID has datatype number, People_ID has datatype number, Date has datatype text, Year has datatype number, Location has datatype text, Country has datatype text, Killed has datatype number, Injured has datatype number which has Perpetrator_ID and Given the Table people having columns as People_ID has datatype number, Name has datatype text, Height has datatype number, Weight has datatype number, Home Town has datatype text which has People_ID. Answer the question by writing the appropriate SQL code. Show the date of the tallest perpetrator.
|
SELECT max(YEAR) FROM perpetrator;
|
Given the Table perpetrator having columns as Perpetrator_ID has datatype number, People_ID has datatype number, Date has datatype text, Year has datatype number, Location has datatype text, Country has datatype text, Killed has datatype number, Injured has datatype number which has Perpetrator_ID and Given the Table people having columns as People_ID has datatype number, Name has datatype text, Height has datatype number, Weight has datatype number, Home Town has datatype text which has People_ID. Answer the question by writing the appropriate SQL code. In which year did the most recent crime happen?
|
SELECT campus FROM campuses WHERE county = "Los Angeles"
|
Given the Table campuses having columns as Id has datatype number, Campus has datatype text, Location has datatype text, County has datatype text, Year has datatype number which has Id and Given the Table csu fees having columns as Campus has datatype number, Year has datatype number, CampusFee has datatype number which has Campus and Given the Table degrees having columns as Year has datatype number, Campus has datatype number, Degrees has datatype number which has Year and Given the Table discipline enrollments having columns as Campus has datatype number, Discipline has datatype number, Year has datatype number, Undergraduate has datatype number, Graduate has datatype number which has Campus and Given the Table enrollments having columns as Campus has datatype number, Year has datatype number, TotalEnrollment_AY has datatype number, FTE_AY has datatype number which has Campus and Given the Table faculty having columns as Campus has datatype number, Year has datatype number, Faculty has datatype number which has NO_PRIMARY_KEY. Answer the question by writing the appropriate SQL code. Report the name of all campuses in Los Angeles county.
|
SELECT campus FROM campuses WHERE county = "Los Angeles"
|
Given the Table campuses having columns as Id has datatype number, Campus has datatype text, Location has datatype text, County has datatype text, Year has datatype number which has Id and Given the Table csu fees having columns as Campus has datatype number, Year has datatype number, CampusFee has datatype number which has Campus and Given the Table degrees having columns as Year has datatype number, Campus has datatype number, Degrees has datatype number which has Year and Given the Table discipline enrollments having columns as Campus has datatype number, Discipline has datatype number, Year has datatype number, Undergraduate has datatype number, Graduate has datatype number which has Campus and Given the Table enrollments having columns as Campus has datatype number, Year has datatype number, TotalEnrollment_AY has datatype number, FTE_AY has datatype number which has Campus and Given the Table faculty having columns as Campus has datatype number, Year has datatype number, Faculty has datatype number which has NO_PRIMARY_KEY. Answer the question by writing the appropriate SQL code. What campuses are located in the county of Los Angeles?
|
SELECT campus FROM campuses WHERE LOCATION = "Chico"
|
Given the Table campuses having columns as Id has datatype number, Campus has datatype text, Location has datatype text, County has datatype text, Year has datatype number which has Id and Given the Table csu fees having columns as Campus has datatype number, Year has datatype number, CampusFee has datatype number which has Campus and Given the Table degrees having columns as Year has datatype number, Campus has datatype number, Degrees has datatype number which has Year and Given the Table discipline enrollments having columns as Campus has datatype number, Discipline has datatype number, Year has datatype number, Undergraduate has datatype number, Graduate has datatype number which has Campus and Given the Table enrollments having columns as Campus has datatype number, Year has datatype number, TotalEnrollment_AY has datatype number, FTE_AY has datatype number which has Campus and Given the Table faculty having columns as Campus has datatype number, Year has datatype number, Faculty has datatype number which has NO_PRIMARY_KEY. Answer the question by writing the appropriate SQL code. What are the names of all campuses located at Chico?
|
SELECT campus FROM campuses WHERE LOCATION = "Chico"
|
Given the Table campuses having columns as Id has datatype number, Campus has datatype text, Location has datatype text, County has datatype text, Year has datatype number which has Id and Given the Table csu fees having columns as Campus has datatype number, Year has datatype number, CampusFee has datatype number which has Campus and Given the Table degrees having columns as Year has datatype number, Campus has datatype number, Degrees has datatype number which has Year and Given the Table discipline enrollments having columns as Campus has datatype number, Discipline has datatype number, Year has datatype number, Undergraduate has datatype number, Graduate has datatype number which has Campus and Given the Table enrollments having columns as Campus has datatype number, Year has datatype number, TotalEnrollment_AY has datatype number, FTE_AY has datatype number which has Campus and Given the Table faculty having columns as Campus has datatype number, Year has datatype number, Faculty has datatype number which has NO_PRIMARY_KEY. Answer the question by writing the appropriate SQL code. What campuses are located in Chico?
|
SELECT campus FROM campuses WHERE YEAR = 1958
|
Given the Table campuses having columns as Id has datatype number, Campus has datatype text, Location has datatype text, County has datatype text, Year has datatype number which has Id and Given the Table csu fees having columns as Campus has datatype number, Year has datatype number, CampusFee has datatype number which has Campus and Given the Table degrees having columns as Year has datatype number, Campus has datatype number, Degrees has datatype number which has Year and Given the Table discipline enrollments having columns as Campus has datatype number, Discipline has datatype number, Year has datatype number, Undergraduate has datatype number, Graduate has datatype number which has Campus and Given the Table enrollments having columns as Campus has datatype number, Year has datatype number, TotalEnrollment_AY has datatype number, FTE_AY has datatype number which has Campus and Given the Table faculty having columns as Campus has datatype number, Year has datatype number, Faculty has datatype number which has NO_PRIMARY_KEY. Answer the question by writing the appropriate SQL code. Find all the campuses opened in 1958.
|
SELECT campus FROM campuses WHERE YEAR = 1958
|
Given the Table campuses having columns as Id has datatype number, Campus has datatype text, Location has datatype text, County has datatype text, Year has datatype number which has Id and Given the Table csu fees having columns as Campus has datatype number, Year has datatype number, CampusFee has datatype number which has Campus and Given the Table degrees having columns as Year has datatype number, Campus has datatype number, Degrees has datatype number which has Year and Given the Table discipline enrollments having columns as Campus has datatype number, Discipline has datatype number, Year has datatype number, Undergraduate has datatype number, Graduate has datatype number which has Campus and Given the Table enrollments having columns as Campus has datatype number, Year has datatype number, TotalEnrollment_AY has datatype number, FTE_AY has datatype number which has Campus and Given the Table faculty having columns as Campus has datatype number, Year has datatype number, Faculty has datatype number which has NO_PRIMARY_KEY. Answer the question by writing the appropriate SQL code. What are the campuses that opened in 1958?
|
SELECT campus FROM campuses WHERE YEAR < 1800
|
Given the Table campuses having columns as Id has datatype number, Campus has datatype text, Location has datatype text, County has datatype text, Year has datatype number which has Id and Given the Table csu fees having columns as Campus has datatype number, Year has datatype number, CampusFee has datatype number which has Campus and Given the Table degrees having columns as Year has datatype number, Campus has datatype number, Degrees has datatype number which has Year and Given the Table discipline enrollments having columns as Campus has datatype number, Discipline has datatype number, Year has datatype number, Undergraduate has datatype number, Graduate has datatype number which has Campus and Given the Table enrollments having columns as Campus has datatype number, Year has datatype number, TotalEnrollment_AY has datatype number, FTE_AY has datatype number which has Campus and Given the Table faculty having columns as Campus has datatype number, Year has datatype number, Faculty has datatype number which has NO_PRIMARY_KEY. Answer the question by writing the appropriate SQL code. Find the name of the campuses opened before 1800.
|
SELECT campus FROM campuses WHERE YEAR < 1800
|
Given the Table campuses having columns as Id has datatype number, Campus has datatype text, Location has datatype text, County has datatype text, Year has datatype number which has Id and Given the Table csu fees having columns as Campus has datatype number, Year has datatype number, CampusFee has datatype number which has Campus and Given the Table degrees having columns as Year has datatype number, Campus has datatype number, Degrees has datatype number which has Year and Given the Table discipline enrollments having columns as Campus has datatype number, Discipline has datatype number, Year has datatype number, Undergraduate has datatype number, Graduate has datatype number which has Campus and Given the Table enrollments having columns as Campus has datatype number, Year has datatype number, TotalEnrollment_AY has datatype number, FTE_AY has datatype number which has Campus and Given the Table faculty having columns as Campus has datatype number, Year has datatype number, Faculty has datatype number which has NO_PRIMARY_KEY. Answer the question by writing the appropriate SQL code. What campuses opened before 1800?
|
SELECT campus FROM campuses WHERE YEAR >= 1935 AND YEAR <= 1939
|
Given the Table campuses having columns as Id has datatype number, Campus has datatype text, Location has datatype text, County has datatype text, Year has datatype number which has Id and Given the Table csu fees having columns as Campus has datatype number, Year has datatype number, CampusFee has datatype number which has Campus and Given the Table degrees having columns as Year has datatype number, Campus has datatype number, Degrees has datatype number which has Year and Given the Table discipline enrollments having columns as Campus has datatype number, Discipline has datatype number, Year has datatype number, Undergraduate has datatype number, Graduate has datatype number which has Campus and Given the Table enrollments having columns as Campus has datatype number, Year has datatype number, TotalEnrollment_AY has datatype number, FTE_AY has datatype number which has Campus and Given the Table faculty having columns as Campus has datatype number, Year has datatype number, Faculty has datatype number which has NO_PRIMARY_KEY. Answer the question by writing the appropriate SQL code. Which campus was opened between 1935 and 1939?
|
SELECT campus FROM campuses WHERE YEAR >= 1935 AND YEAR <= 1939
|
Given the Table campuses having columns as Id has datatype number, Campus has datatype text, Location has datatype text, County has datatype text, Year has datatype number which has Id and Given the Table csu fees having columns as Campus has datatype number, Year has datatype number, CampusFee has datatype number which has Campus and Given the Table degrees having columns as Year has datatype number, Campus has datatype number, Degrees has datatype number which has Year and Given the Table discipline enrollments having columns as Campus has datatype number, Discipline has datatype number, Year has datatype number, Undergraduate has datatype number, Graduate has datatype number which has Campus and Given the Table enrollments having columns as Campus has datatype number, Year has datatype number, TotalEnrollment_AY has datatype number, FTE_AY has datatype number which has Campus and Given the Table faculty having columns as Campus has datatype number, Year has datatype number, Faculty has datatype number which has NO_PRIMARY_KEY. Answer the question by writing the appropriate SQL code. What campuses opened between 1935 and 1939?
|
SELECT campus FROM campuses WHERE LOCATION = "Northridge" AND county = "Los Angeles" UNION SELECT campus FROM campuses WHERE LOCATION = "San Francisco" AND county = "San Francisco"
|
Given the Table campuses having columns as Id has datatype number, Campus has datatype text, Location has datatype text, County has datatype text, Year has datatype number which has Id and Given the Table csu fees having columns as Campus has datatype number, Year has datatype number, CampusFee has datatype number which has Campus and Given the Table degrees having columns as Year has datatype number, Campus has datatype number, Degrees has datatype number which has Year and Given the Table discipline enrollments having columns as Campus has datatype number, Discipline has datatype number, Year has datatype number, Undergraduate has datatype number, Graduate has datatype number which has Campus and Given the Table enrollments having columns as Campus has datatype number, Year has datatype number, TotalEnrollment_AY has datatype number, FTE_AY has datatype number which has Campus and Given the Table faculty having columns as Campus has datatype number, Year has datatype number, Faculty has datatype number which has NO_PRIMARY_KEY. Answer the question by writing the appropriate SQL code. 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"
|
Given the Table campuses having columns as Id has datatype number, Campus has datatype text, Location has datatype text, County has datatype text, Year has datatype number which has Id and Given the Table csu fees having columns as Campus has datatype number, Year has datatype number, CampusFee has datatype number which has Campus and Given the Table degrees having columns as Year has datatype number, Campus has datatype number, Degrees has datatype number which has Year and Given the Table discipline enrollments having columns as Campus has datatype number, Discipline has datatype number, Year has datatype number, Undergraduate has datatype number, Graduate has datatype number which has Campus and Given the Table enrollments having columns as Campus has datatype number, Year has datatype number, TotalEnrollment_AY has datatype number, FTE_AY has datatype number which has Campus and Given the Table faculty having columns as Campus has datatype number, Year has datatype number, Faculty has datatype number which has NO_PRIMARY_KEY. Answer the question by writing the appropriate SQL code. What campuses are located in Northridge, Los Angeles or in San Francisco, San Francisco?
|
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
|
Given the Table campuses having columns as Id has datatype number, Campus has datatype text, Location has datatype text, County has datatype text, Year has datatype number which has Id and Given the Table csu fees having columns as Campus has datatype number, Year has datatype number, CampusFee has datatype number which has Campus and Given the Table degrees having columns as Year has datatype number, Campus has datatype number, Degrees has datatype number which has Year and Given the Table discipline enrollments having columns as Campus has datatype number, Discipline has datatype number, Year has datatype number, Undergraduate has datatype number, Graduate has datatype number which has Campus and Given the Table enrollments having columns as Campus has datatype number, Year has datatype number, TotalEnrollment_AY has datatype number, FTE_AY has datatype number which has Campus and Given the Table faculty having columns as Campus has datatype number, Year has datatype number, Faculty has datatype number which has NO_PRIMARY_KEY. Answer the question by writing the appropriate SQL code. 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
|
Given the Table campuses having columns as Id has datatype number, Campus has datatype text, Location has datatype text, County has datatype text, Year has datatype number which has Id and Given the Table csu fees having columns as Campus has datatype number, Year has datatype number, CampusFee has datatype number which has Campus and Given the Table degrees having columns as Year has datatype number, Campus has datatype number, Degrees has datatype number which has Year and Given the Table discipline enrollments having columns as Campus has datatype number, Discipline has datatype number, Year has datatype number, Undergraduate has datatype number, Graduate has datatype number which has Campus and Given the Table enrollments having columns as Campus has datatype number, Year has datatype number, TotalEnrollment_AY has datatype number, FTE_AY has datatype number which has Campus and Given the Table faculty having columns as Campus has datatype number, Year has datatype number, Faculty has datatype number which has NO_PRIMARY_KEY. Answer the question by writing the appropriate SQL code. What is the campus fee for San Jose State University in 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
|
Given the Table campuses having columns as Id has datatype number, Campus has datatype text, Location has datatype text, County has datatype text, Year has datatype number which has Id and Given the Table csu fees having columns as Campus has datatype number, Year has datatype number, CampusFee has datatype number which has Campus and Given the Table degrees having columns as Year has datatype number, Campus has datatype number, Degrees has datatype number which has Year and Given the Table discipline enrollments having columns as Campus has datatype number, Discipline has datatype number, Year has datatype number, Undergraduate has datatype number, Graduate has datatype number which has Campus and Given the Table enrollments having columns as Campus has datatype number, Year has datatype number, TotalEnrollment_AY has datatype number, FTE_AY has datatype number which has Campus and Given the Table faculty having columns as Campus has datatype number, Year has datatype number, Faculty has datatype number which has NO_PRIMARY_KEY. Answer the question by writing the appropriate SQL code. 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
|
Given the Table campuses having columns as Id has datatype number, Campus has datatype text, Location has datatype text, County has datatype text, Year has datatype number which has Id and Given the Table csu fees having columns as Campus has datatype number, Year has datatype number, CampusFee has datatype number which has Campus and Given the Table degrees having columns as Year has datatype number, Campus has datatype number, Degrees has datatype number which has Year and Given the Table discipline enrollments having columns as Campus has datatype number, Discipline has datatype number, Year has datatype number, Undergraduate has datatype number, Graduate has datatype number which has Campus and Given the Table enrollments having columns as Campus has datatype number, Year has datatype number, TotalEnrollment_AY has datatype number, FTE_AY has datatype number which has Campus and Given the Table faculty having columns as Campus has datatype number, Year has datatype number, Faculty has datatype number which has NO_PRIMARY_KEY. Answer the question by writing the appropriate SQL code. What is the campus fee for San Francisco State University in 1996?
|
SELECT count(*) FROM csu_fees WHERE campusfee > (SELECT avg(campusfee) FROM csu_fees)
|
Given the Table campuses having columns as Id has datatype number, Campus has datatype text, Location has datatype text, County has datatype text, Year has datatype number which has Id and Given the Table csu fees having columns as Campus has datatype number, Year has datatype number, CampusFee has datatype number which has Campus and Given the Table degrees having columns as Year has datatype number, Campus has datatype number, Degrees has datatype number which has Year and Given the Table discipline enrollments having columns as Campus has datatype number, Discipline has datatype number, Year has datatype number, Undergraduate has datatype number, Graduate has datatype number which has Campus and Given the Table enrollments having columns as Campus has datatype number, Year has datatype number, TotalEnrollment_AY has datatype number, FTE_AY has datatype number which has Campus and Given the Table faculty having columns as Campus has datatype number, Year has datatype number, Faculty has datatype number which has NO_PRIMARY_KEY. Answer the question by writing the appropriate SQL code. 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)
|
Given the Table campuses having columns as Id has datatype number, Campus has datatype text, Location has datatype text, County has datatype text, Year has datatype number which has Id and Given the Table csu fees having columns as Campus has datatype number, Year has datatype number, CampusFee has datatype number which has Campus and Given the Table degrees having columns as Year has datatype number, Campus has datatype number, Degrees has datatype number which has Year and Given the Table discipline enrollments having columns as Campus has datatype number, Discipline has datatype number, Year has datatype number, Undergraduate has datatype number, Graduate has datatype number which has Campus and Given the Table enrollments having columns as Campus has datatype number, Year has datatype number, TotalEnrollment_AY has datatype number, FTE_AY has datatype number which has Campus and Given the Table faculty having columns as Campus has datatype number, Year has datatype number, Faculty has datatype number which has NO_PRIMARY_KEY. Answer the question by writing the appropriate SQL code. How many universities have a campus fee higher than average?
|
SELECT count(*) FROM csu_fees WHERE campusfee > (SELECT avg(campusfee) FROM csu_fees)
|
Given the Table campuses having columns as Id has datatype number, Campus has datatype text, Location has datatype text, County has datatype text, Year has datatype number which has Id and Given the Table csu fees having columns as Campus has datatype number, Year has datatype number, CampusFee has datatype number which has Campus and Given the Table degrees having columns as Year has datatype number, Campus has datatype number, Degrees has datatype number which has Year and Given the Table discipline enrollments having columns as Campus has datatype number, Discipline has datatype number, Year has datatype number, Undergraduate has datatype number, Graduate has datatype number which has Campus and Given the Table enrollments having columns as Campus has datatype number, Year has datatype number, TotalEnrollment_AY has datatype number, FTE_AY has datatype number which has Campus and Given the Table faculty having columns as Campus has datatype number, Year has datatype number, Faculty has datatype number which has NO_PRIMARY_KEY. Answer the question by writing the appropriate SQL code. How many universities have a campus fee greater than the average?
|
SELECT campus FROM campuses WHERE county = "Los Angeles" AND YEAR > 1950
|
Given the Table campuses having columns as Id has datatype number, Campus has datatype text, Location has datatype text, County has datatype text, Year has datatype number which has Id and Given the Table csu fees having columns as Campus has datatype number, Year has datatype number, CampusFee has datatype number which has Campus and Given the Table degrees having columns as Year has datatype number, Campus has datatype number, Degrees has datatype number which has Year and Given the Table discipline enrollments having columns as Campus has datatype number, Discipline has datatype number, Year has datatype number, Undergraduate has datatype number, Graduate has datatype number which has Campus and Given the Table enrollments having columns as Campus has datatype number, Year has datatype number, TotalEnrollment_AY has datatype number, FTE_AY has datatype number which has Campus and Given the Table faculty having columns as Campus has datatype number, Year has datatype number, Faculty has datatype number which has NO_PRIMARY_KEY. Answer the question by writing the appropriate SQL code. Which university is in Los Angeles county and opened after 1950?
|
SELECT campus FROM campuses WHERE county = "Los Angeles" AND YEAR > 1950
|
Given the Table campuses having columns as Id has datatype number, Campus has datatype text, Location has datatype text, County has datatype text, Year has datatype number which has Id and Given the Table csu fees having columns as Campus has datatype number, Year has datatype number, CampusFee has datatype number which has Campus and Given the Table degrees having columns as Year has datatype number, Campus has datatype number, Degrees has datatype number which has Year and Given the Table discipline enrollments having columns as Campus has datatype number, Discipline has datatype number, Year has datatype number, Undergraduate has datatype number, Graduate has datatype number which has Campus and Given the Table enrollments having columns as Campus has datatype number, Year has datatype number, TotalEnrollment_AY has datatype number, FTE_AY has datatype number which has Campus and Given the Table faculty having columns as Campus has datatype number, Year has datatype number, Faculty has datatype number which has NO_PRIMARY_KEY. Answer the question by writing the appropriate SQL code. What campuses are located in Los Angeles county and opened after 1950?
|
SELECT YEAR FROM degrees GROUP BY YEAR ORDER BY sum(degrees) DESC LIMIT 1
|
Given the Table campuses having columns as Id has datatype number, Campus has datatype text, Location has datatype text, County has datatype text, Year has datatype number which has Id and Given the Table csu fees having columns as Campus has datatype number, Year has datatype number, CampusFee has datatype number which has Campus and Given the Table degrees having columns as Year has datatype number, Campus has datatype number, Degrees has datatype number which has Year and Given the Table discipline enrollments having columns as Campus has datatype number, Discipline has datatype number, Year has datatype number, Undergraduate has datatype number, Graduate has datatype number which has Campus and Given the Table enrollments having columns as Campus has datatype number, Year has datatype number, TotalEnrollment_AY has datatype number, FTE_AY has datatype number which has Campus and Given the Table faculty having columns as Campus has datatype number, Year has datatype number, Faculty has datatype number which has NO_PRIMARY_KEY. Answer the question by writing the appropriate SQL code. Which year has the most degrees conferred?
|
SELECT YEAR FROM degrees GROUP BY YEAR ORDER BY sum(degrees) DESC LIMIT 1
|
Given the Table campuses having columns as Id has datatype number, Campus has datatype text, Location has datatype text, County has datatype text, Year has datatype number which has Id and Given the Table csu fees having columns as Campus has datatype number, Year has datatype number, CampusFee has datatype number which has Campus and Given the Table degrees having columns as Year has datatype number, Campus has datatype number, Degrees has datatype number which has Year and Given the Table discipline enrollments having columns as Campus has datatype number, Discipline has datatype number, Year has datatype number, Undergraduate has datatype number, Graduate has datatype number which has Campus and Given the Table enrollments having columns as Campus has datatype number, Year has datatype number, TotalEnrollment_AY has datatype number, FTE_AY has datatype number which has Campus and Given the Table faculty having columns as Campus has datatype number, Year has datatype number, Faculty has datatype number which has NO_PRIMARY_KEY. Answer the question by writing the appropriate SQL code. In what year was the most degrees conferred?
|
SELECT campus FROM degrees GROUP BY campus ORDER BY sum(degrees) DESC LIMIT 1
|
Given the Table campuses having columns as Id has datatype number, Campus has datatype text, Location has datatype text, County has datatype text, Year has datatype number which has Id and Given the Table csu fees having columns as Campus has datatype number, Year has datatype number, CampusFee has datatype number which has Campus and Given the Table degrees having columns as Year has datatype number, Campus has datatype number, Degrees has datatype number which has Year and Given the Table discipline enrollments having columns as Campus has datatype number, Discipline has datatype number, Year has datatype number, Undergraduate has datatype number, Graduate has datatype number which has Campus and Given the Table enrollments having columns as Campus has datatype number, Year has datatype number, TotalEnrollment_AY has datatype number, FTE_AY has datatype number which has Campus and Given the Table faculty having columns as Campus has datatype number, Year has datatype number, Faculty has datatype number which has NO_PRIMARY_KEY. Answer the question by writing the appropriate SQL code. Which campus has the most degrees conferred in all times?
|
SELECT campus FROM degrees GROUP BY campus ORDER BY sum(degrees) DESC LIMIT 1
|
Given the Table campuses having columns as Id has datatype number, Campus has datatype text, Location has datatype text, County has datatype text, Year has datatype number which has Id and Given the Table csu fees having columns as Campus has datatype number, Year has datatype number, CampusFee has datatype number which has Campus and Given the Table degrees having columns as Year has datatype number, Campus has datatype number, Degrees has datatype number which has Year and Given the Table discipline enrollments having columns as Campus has datatype number, Discipline has datatype number, Year has datatype number, Undergraduate has datatype number, Graduate has datatype number which has Campus and Given the Table enrollments having columns as Campus has datatype number, Year has datatype number, TotalEnrollment_AY has datatype number, FTE_AY has datatype number which has Campus and Given the Table faculty having columns as Campus has datatype number, Year has datatype number, Faculty has datatype number which has NO_PRIMARY_KEY. Answer the question by writing the appropriate SQL code. What campus has the most degrees conferrred over its entire existence?
|
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
|
Given the Table campuses having columns as Id has datatype number, Campus has datatype text, Location has datatype text, County has datatype text, Year has datatype number which has Id and Given the Table csu fees having columns as Campus has datatype number, Year has datatype number, CampusFee has datatype number which has Campus and Given the Table degrees having columns as Year has datatype number, Campus has datatype number, Degrees has datatype number which has Year and Given the Table discipline enrollments having columns as Campus has datatype number, Discipline has datatype number, Year has datatype number, Undergraduate has datatype number, Graduate has datatype number which has Campus and Given the Table enrollments having columns as Campus has datatype number, Year has datatype number, TotalEnrollment_AY has datatype number, FTE_AY has datatype number which has Campus and Given the Table faculty having columns as Campus has datatype number, Year has datatype number, Faculty has datatype number which has NO_PRIMARY_KEY. Answer the question by writing the appropriate SQL code. 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
|
Given the Table campuses having columns as Id has datatype number, Campus has datatype text, Location has datatype text, County has datatype text, Year has datatype number which has Id and Given the Table csu fees having columns as Campus has datatype number, Year has datatype number, CampusFee has datatype number which has Campus and Given the Table degrees having columns as Year has datatype number, Campus has datatype number, Degrees has datatype number which has Year and Given the Table discipline enrollments having columns as Campus has datatype number, Discipline has datatype number, Year has datatype number, Undergraduate has datatype number, Graduate has datatype number which has Campus and Given the Table enrollments having columns as Campus has datatype number, Year has datatype number, TotalEnrollment_AY has datatype number, FTE_AY has datatype number which has Campus and Given the Table faculty having columns as Campus has datatype number, Year has datatype number, Faculty has datatype number which has NO_PRIMARY_KEY. Answer the question by writing the appropriate SQL code. What campus has the most faculties in 2003?
|
SELECT avg(campusfee) FROM csu_fees WHERE YEAR = 1996
|
Given the Table campuses having columns as Id has datatype number, Campus has datatype text, Location has datatype text, County has datatype text, Year has datatype number which has Id and Given the Table csu fees having columns as Campus has datatype number, Year has datatype number, CampusFee has datatype number which has Campus and Given the Table degrees having columns as Year has datatype number, Campus has datatype number, Degrees has datatype number which has Year and Given the Table discipline enrollments having columns as Campus has datatype number, Discipline has datatype number, Year has datatype number, Undergraduate has datatype number, Graduate has datatype number which has Campus and Given the Table enrollments having columns as Campus has datatype number, Year has datatype number, TotalEnrollment_AY has datatype number, FTE_AY has datatype number which has Campus and Given the Table faculty having columns as Campus has datatype number, Year has datatype number, Faculty has datatype number which has NO_PRIMARY_KEY. Answer the question by writing the appropriate SQL code. Find the average fee on a CSU campus in 1996
|
SELECT avg(campusfee) FROM csu_fees WHERE YEAR = 1996
|
Given the Table campuses having columns as Id has datatype number, Campus has datatype text, Location has datatype text, County has datatype text, Year has datatype number which has Id and Given the Table csu fees having columns as Campus has datatype number, Year has datatype number, CampusFee has datatype number which has Campus and Given the Table degrees having columns as Year has datatype number, Campus has datatype number, Degrees has datatype number which has Year and Given the Table discipline enrollments having columns as Campus has datatype number, Discipline has datatype number, Year has datatype number, Undergraduate has datatype number, Graduate has datatype number which has Campus and Given the Table enrollments having columns as Campus has datatype number, Year has datatype number, TotalEnrollment_AY has datatype number, FTE_AY has datatype number which has Campus and Given the Table faculty having columns as Campus has datatype number, Year has datatype number, Faculty has datatype number which has NO_PRIMARY_KEY. Answer the question by writing the appropriate SQL code. What is the average fee for a CSU campus in the year of 1996?
|
SELECT avg(campusfee) FROM csu_fees WHERE YEAR = 2005
|
Given the Table campuses having columns as Id has datatype number, Campus has datatype text, Location has datatype text, County has datatype text, Year has datatype number which has Id and Given the Table csu fees having columns as Campus has datatype number, Year has datatype number, CampusFee has datatype number which has Campus and Given the Table degrees having columns as Year has datatype number, Campus has datatype number, Degrees has datatype number which has Year and Given the Table discipline enrollments having columns as Campus has datatype number, Discipline has datatype number, Year has datatype number, Undergraduate has datatype number, Graduate has datatype number which has Campus and Given the Table enrollments having columns as Campus has datatype number, Year has datatype number, TotalEnrollment_AY has datatype number, FTE_AY has datatype number which has Campus and Given the Table faculty having columns as Campus has datatype number, Year has datatype number, Faculty has datatype number which has NO_PRIMARY_KEY. Answer the question by writing the appropriate SQL code. What is the average fee on a CSU campus in 2005?
|
SELECT avg(campusfee) FROM csu_fees WHERE YEAR = 2005
|
Given the Table campuses having columns as Id has datatype number, Campus has datatype text, Location has datatype text, County has datatype text, Year has datatype number which has Id and Given the Table csu fees having columns as Campus has datatype number, Year has datatype number, CampusFee has datatype number which has Campus and Given the Table degrees having columns as Year has datatype number, Campus has datatype number, Degrees has datatype number which has Year and Given the Table discipline enrollments having columns as Campus has datatype number, Discipline has datatype number, Year has datatype number, Undergraduate has datatype number, Graduate has datatype number which has Campus and Given the Table enrollments having columns as Campus has datatype number, Year has datatype number, TotalEnrollment_AY has datatype number, FTE_AY has datatype number which has Campus and Given the Table faculty having columns as Campus has datatype number, Year has datatype number, Faculty has datatype number which has NO_PRIMARY_KEY. Answer the question by writing the appropriate SQL code. What is the average fee for a CSU campus in the year of 2005?
|
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
|
Given the Table campuses having columns as Id has datatype number, Campus has datatype text, Location has datatype text, County has datatype text, Year has datatype number which has Id and Given the Table csu fees having columns as Campus has datatype number, Year has datatype number, CampusFee has datatype number which has Campus and Given the Table degrees having columns as Year has datatype number, Campus has datatype number, Degrees has datatype number which has Year and Given the Table discipline enrollments having columns as Campus has datatype number, Discipline has datatype number, Year has datatype number, Undergraduate has datatype number, Graduate has datatype number which has Campus and Given the Table enrollments having columns as Campus has datatype number, Year has datatype number, TotalEnrollment_AY has datatype number, FTE_AY has datatype number which has Campus and Given the Table faculty having columns as Campus has datatype number, Year has datatype number, Faculty has datatype number which has NO_PRIMARY_KEY. Answer the question by writing the appropriate SQL code. report the total number of degrees granted between 1998 and 2002.
|
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
|
Given the Table campuses having columns as Id has datatype number, Campus has datatype text, Location has datatype text, County has datatype text, Year has datatype number which has Id and Given the Table csu fees having columns as Campus has datatype number, Year has datatype number, CampusFee has datatype number which has Campus and Given the Table degrees having columns as Year has datatype number, Campus has datatype number, Degrees has datatype number which has Year and Given the Table discipline enrollments having columns as Campus has datatype number, Discipline has datatype number, Year has datatype number, Undergraduate has datatype number, Graduate has datatype number which has Campus and Given the Table enrollments having columns as Campus has datatype number, Year has datatype number, TotalEnrollment_AY has datatype number, FTE_AY has datatype number which has Campus and Given the Table faculty having columns as Campus has datatype number, Year has datatype number, Faculty has datatype number which has NO_PRIMARY_KEY. Answer the question by writing the appropriate SQL code. how many degrees were conferred between 1998 and 2002?
|
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
|
Given the Table campuses having columns as Id has datatype number, Campus has datatype text, Location has datatype text, County has datatype text, Year has datatype number which has Id and Given the Table csu fees having columns as Campus has datatype number, Year has datatype number, CampusFee has datatype number which has Campus and Given the Table degrees having columns as Year has datatype number, Campus has datatype number, Degrees has datatype number which has Year and Given the Table discipline enrollments having columns as Campus has datatype number, Discipline has datatype number, Year has datatype number, Undergraduate has datatype number, Graduate has datatype number which has Campus and Given the Table enrollments having columns as Campus has datatype number, Year has datatype number, TotalEnrollment_AY has datatype number, FTE_AY has datatype number which has Campus and Given the Table faculty having columns as Campus has datatype number, Year has datatype number, Faculty has datatype number which has NO_PRIMARY_KEY. Answer the question by writing the appropriate SQL code. 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
|
Given the Table campuses having columns as Id has datatype number, Campus has datatype text, Location has datatype text, County has datatype text, Year has datatype number which has Id and Given the Table csu fees having columns as Campus has datatype number, Year has datatype number, CampusFee has datatype number which has Campus and Given the Table degrees having columns as Year has datatype number, Campus has datatype number, Degrees has datatype number which has Year and Given the Table discipline enrollments having columns as Campus has datatype number, Discipline has datatype number, Year has datatype number, Undergraduate has datatype number, Graduate has datatype number which has Campus and Given the Table enrollments having columns as Campus has datatype number, Year has datatype number, TotalEnrollment_AY has datatype number, FTE_AY has datatype number which has Campus and Given the Table faculty having columns as Campus has datatype number, Year has datatype number, Faculty has datatype number which has NO_PRIMARY_KEY. Answer the question by writing the appropriate SQL code. What is the total number of degrees granted after 2000 for each Orange county campus?
|
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")
|
Given the Table campuses having columns as Id has datatype number, Campus has datatype text, Location has datatype text, County has datatype text, Year has datatype number which has Id and Given the Table csu fees having columns as Campus has datatype number, Year has datatype number, CampusFee has datatype number which has Campus and Given the Table degrees having columns as Year has datatype number, Campus has datatype number, Degrees has datatype number which has Year and Given the Table discipline enrollments having columns as Campus has datatype number, Discipline has datatype number, Year has datatype number, Undergraduate has datatype number, Graduate has datatype number which has Campus and Given the Table enrollments having columns as Campus has datatype number, Year has datatype number, TotalEnrollment_AY has datatype number, FTE_AY has datatype number which has Campus and Given the Table faculty having columns as Campus has datatype number, Year has datatype number, Faculty has datatype number which has NO_PRIMARY_KEY. Answer the question by writing the appropriate SQL code. 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")
|
Given the Table campuses having columns as Id has datatype number, Campus has datatype text, Location has datatype text, County has datatype text, Year has datatype number which has Id and Given the Table csu fees having columns as Campus has datatype number, Year has datatype number, CampusFee has datatype number which has Campus and Given the Table degrees having columns as Year has datatype number, Campus has datatype number, Degrees has datatype number which has Year and Given the Table discipline enrollments having columns as Campus has datatype number, Discipline has datatype number, Year has datatype number, Undergraduate has datatype number, Graduate has datatype number which has Campus and Given the Table enrollments having columns as Campus has datatype number, Year has datatype number, TotalEnrollment_AY has datatype number, FTE_AY has datatype number which has Campus and Given the Table faculty having columns as Campus has datatype number, Year has datatype number, Faculty has datatype number which has NO_PRIMARY_KEY. Answer the question by writing the appropriate SQL code. What are the names of the campus that have more faculties in 2002 than the maximum number in Orange county?
|
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
|
Given the Table campuses having columns as Id has datatype number, Campus has datatype text, Location has datatype text, County has datatype text, Year has datatype number which has Id and Given the Table csu fees having columns as Campus has datatype number, Year has datatype number, CampusFee has datatype number which has Campus and Given the Table degrees having columns as Year has datatype number, Campus has datatype number, Degrees has datatype number which has Year and Given the Table discipline enrollments having columns as Campus has datatype number, Discipline has datatype number, Year has datatype number, Undergraduate has datatype number, Graduate has datatype number which has Campus and Given the Table enrollments having columns as Campus has datatype number, Year has datatype number, TotalEnrollment_AY has datatype number, FTE_AY has datatype number which has Campus and Given the Table faculty having columns as Campus has datatype number, Year has datatype number, Faculty has datatype number which has NO_PRIMARY_KEY. Answer the question by writing the appropriate SQL code. 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
|
Given the Table campuses having columns as Id has datatype number, Campus has datatype text, Location has datatype text, County has datatype text, Year has datatype number which has Id and Given the Table csu fees having columns as Campus has datatype number, Year has datatype number, CampusFee has datatype number which has Campus and Given the Table degrees having columns as Year has datatype number, Campus has datatype number, Degrees has datatype number which has Year and Given the Table discipline enrollments having columns as Campus has datatype number, Discipline has datatype number, Year has datatype number, Undergraduate has datatype number, Graduate has datatype number which has Campus and Given the Table enrollments having columns as Campus has datatype number, Year has datatype number, TotalEnrollment_AY has datatype number, FTE_AY has datatype number which has Campus and Given the Table faculty having columns as Campus has datatype number, Year has datatype number, Faculty has datatype number which has NO_PRIMARY_KEY. Answer the question by writing the appropriate SQL code. What campus started in year 1956, has more than 200 full time students, and more than 400 students enrolled?
|
SELECT count(*) FROM campuses WHERE county = "Los Angeles"
|
Given the Table campuses having columns as Id has datatype number, Campus has datatype text, Location has datatype text, County has datatype text, Year has datatype number which has Id and Given the Table csu fees having columns as Campus has datatype number, Year has datatype number, CampusFee has datatype number which has Campus and Given the Table degrees having columns as Year has datatype number, Campus has datatype number, Degrees has datatype number which has Year and Given the Table discipline enrollments having columns as Campus has datatype number, Discipline has datatype number, Year has datatype number, Undergraduate has datatype number, Graduate has datatype number which has Campus and Given the Table enrollments having columns as Campus has datatype number, Year has datatype number, TotalEnrollment_AY has datatype number, FTE_AY has datatype number which has Campus and Given the Table faculty having columns as Campus has datatype number, Year has datatype number, Faculty has datatype number which has NO_PRIMARY_KEY. Answer the question by writing the appropriate SQL code. How many campuses are there in Los Angeles county?
|
SELECT count(*) FROM campuses WHERE county = "Los Angeles"
|
Given the Table campuses having columns as Id has datatype number, Campus has datatype text, Location has datatype text, County has datatype text, Year has datatype number which has Id and Given the Table csu fees having columns as Campus has datatype number, Year has datatype number, CampusFee has datatype number which has Campus and Given the Table degrees having columns as Year has datatype number, Campus has datatype number, Degrees has datatype number which has Year and Given the Table discipline enrollments having columns as Campus has datatype number, Discipline has datatype number, Year has datatype number, Undergraduate has datatype number, Graduate has datatype number which has Campus and Given the Table enrollments having columns as Campus has datatype number, Year has datatype number, TotalEnrollment_AY has datatype number, FTE_AY has datatype number which has Campus and Given the Table faculty having columns as Campus has datatype number, Year has datatype number, Faculty has datatype number which has NO_PRIMARY_KEY. Answer the question by writing the appropriate SQL code. How many campuses exist are in the county of LA?
|
SELECT campus FROM campuses WHERE county = "Los Angeles"
|
Given the Table campuses having columns as Id has datatype number, Campus has datatype text, Location has datatype text, County has datatype text, Year has datatype number which has Id and Given the Table csu fees having columns as Campus has datatype number, Year has datatype number, CampusFee has datatype number which has Campus and Given the Table degrees having columns as Year has datatype number, Campus has datatype number, Degrees has datatype number which has Year and Given the Table discipline enrollments having columns as Campus has datatype number, Discipline has datatype number, Year has datatype number, Undergraduate has datatype number, Graduate has datatype number which has Campus and Given the Table enrollments having columns as Campus has datatype number, Year has datatype number, TotalEnrollment_AY has datatype number, FTE_AY has datatype number which has Campus and Given the Table faculty having columns as Campus has datatype number, Year has datatype number, Faculty has datatype number which has NO_PRIMARY_KEY. Answer the question by writing the appropriate SQL code. List the campuses in Los Angeles county.
|
SELECT campus FROM campuses WHERE county = "Los Angeles"
|
Given the Table campuses having columns as Id has datatype number, Campus has datatype text, Location has datatype text, County has datatype text, Year has datatype number which has Id and Given the Table csu fees having columns as Campus has datatype number, Year has datatype number, CampusFee has datatype number which has Campus and Given the Table degrees having columns as Year has datatype number, Campus has datatype number, Degrees has datatype number which has Year and Given the Table discipline enrollments having columns as Campus has datatype number, Discipline has datatype number, Year has datatype number, Undergraduate has datatype number, Graduate has datatype number which has Campus and Given the Table enrollments having columns as Campus has datatype number, Year has datatype number, TotalEnrollment_AY has datatype number, FTE_AY has datatype number which has Campus and Given the Table faculty having columns as Campus has datatype number, Year has datatype number, Faculty has datatype number which has NO_PRIMARY_KEY. Answer the question by writing the appropriate SQL code. What campuses are in Los Angeles county?
|
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
|
Given the Table campuses having columns as Id has datatype number, Campus has datatype text, Location has datatype text, County has datatype text, Year has datatype number which has Id and Given the Table csu fees having columns as Campus has datatype number, Year has datatype number, CampusFee has datatype number which has Campus and Given the Table degrees having columns as Year has datatype number, Campus has datatype number, Degrees has datatype number which has Year and Given the Table discipline enrollments having columns as Campus has datatype number, Discipline has datatype number, Year has datatype number, Undergraduate has datatype number, Graduate has datatype number which has Campus and Given the Table enrollments having columns as Campus has datatype number, Year has datatype number, TotalEnrollment_AY has datatype number, FTE_AY has datatype number which has Campus and Given the Table faculty having columns as Campus has datatype number, Year has datatype number, Faculty has datatype number which has NO_PRIMARY_KEY. Answer the question by writing the appropriate SQL code. 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
|
Given the Table campuses having columns as Id has datatype number, Campus has datatype text, Location has datatype text, County has datatype text, Year has datatype number which has Id and Given the Table csu fees having columns as Campus has datatype number, Year has datatype number, CampusFee has datatype number which has Campus and Given the Table degrees having columns as Year has datatype number, Campus has datatype number, Degrees has datatype number which has Year and Given the Table discipline enrollments having columns as Campus has datatype number, Discipline has datatype number, Year has datatype number, Undergraduate has datatype number, Graduate has datatype number which has Campus and Given the Table enrollments having columns as Campus has datatype number, Year has datatype number, TotalEnrollment_AY has datatype number, FTE_AY has datatype number which has Campus and Given the Table faculty having columns as Campus has datatype number, Year has datatype number, Faculty has datatype number which has NO_PRIMARY_KEY. Answer the question by writing the appropriate SQL code. How many degrees were conferred at 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 Francisco State University" AND t2.year = 2001
|
Given the Table campuses having columns as Id has datatype number, Campus has datatype text, Location has datatype text, County has datatype text, Year has datatype number which has Id and Given the Table csu fees having columns as Campus has datatype number, Year has datatype number, CampusFee has datatype number which has Campus and Given the Table degrees having columns as Year has datatype number, Campus has datatype number, Degrees has datatype number which has Year and Given the Table discipline enrollments having columns as Campus has datatype number, Discipline has datatype number, Year has datatype number, Undergraduate has datatype number, Graduate has datatype number which has Campus and Given the Table enrollments having columns as Campus has datatype number, Year has datatype number, TotalEnrollment_AY has datatype number, FTE_AY has datatype number which has Campus and Given the Table faculty having columns as Campus has datatype number, Year has datatype number, Faculty has datatype number which has NO_PRIMARY_KEY. Answer the question by writing the appropriate SQL code. What are the degrees conferred in "San Francisco State University" in 2001.
|
SELECT degrees FROM campuses AS T1 JOIN degrees AS T2 ON t1.id = t2.campus WHERE t1.campus = "San Francisco State University" AND t2.year = 2001
|
Given the Table campuses having columns as Id has datatype number, Campus has datatype text, Location has datatype text, County has datatype text, Year has datatype number which has Id and Given the Table csu fees having columns as Campus has datatype number, Year has datatype number, CampusFee has datatype number which has Campus and Given the Table degrees having columns as Year has datatype number, Campus has datatype number, Degrees has datatype number which has Year and Given the Table discipline enrollments having columns as Campus has datatype number, Discipline has datatype number, Year has datatype number, Undergraduate has datatype number, Graduate has datatype number which has Campus and Given the Table enrollments having columns as Campus has datatype number, Year has datatype number, TotalEnrollment_AY has datatype number, FTE_AY has datatype number which has Campus and Given the Table faculty having columns as Campus has datatype number, Year has datatype number, Faculty has datatype number which has NO_PRIMARY_KEY. Answer the question by writing the appropriate SQL code. What degrees were conferred in San Francisco State University in the year 2001?
|
SELECT sum(faculty) FROM faculty WHERE YEAR = 2002
|
Given the Table campuses having columns as Id has datatype number, Campus has datatype text, Location has datatype text, County has datatype text, Year has datatype number which has Id and Given the Table csu fees having columns as Campus has datatype number, Year has datatype number, CampusFee has datatype number which has Campus and Given the Table degrees having columns as Year has datatype number, Campus has datatype number, Degrees has datatype number which has Year and Given the Table discipline enrollments having columns as Campus has datatype number, Discipline has datatype number, Year has datatype number, Undergraduate has datatype number, Graduate has datatype number which has Campus and Given the Table enrollments having columns as Campus has datatype number, Year has datatype number, TotalEnrollment_AY has datatype number, FTE_AY has datatype number which has Campus and Given the Table faculty having columns as Campus has datatype number, Year has datatype number, Faculty has datatype number which has NO_PRIMARY_KEY. Answer the question by writing the appropriate SQL code. How many faculty is there in total in the year of 2002?
|
SELECT sum(faculty) FROM faculty WHERE YEAR = 2002
|
Given the Table campuses having columns as Id has datatype number, Campus has datatype text, Location has datatype text, County has datatype text, Year has datatype number which has Id and Given the Table csu fees having columns as Campus has datatype number, Year has datatype number, CampusFee has datatype number which has Campus and Given the Table degrees having columns as Year has datatype number, Campus has datatype number, Degrees has datatype number which has Year and Given the Table discipline enrollments having columns as Campus has datatype number, Discipline has datatype number, Year has datatype number, Undergraduate has datatype number, Graduate has datatype number which has Campus and Given the Table enrollments having columns as Campus has datatype number, Year has datatype number, TotalEnrollment_AY has datatype number, FTE_AY has datatype number which has Campus and Given the Table faculty having columns as Campus has datatype number, Year has datatype number, Faculty has datatype number which has NO_PRIMARY_KEY. Answer the question by writing the appropriate SQL code. How many faculty, in total, are there in the year 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"
|
Given the Table campuses having columns as Id has datatype number, Campus has datatype text, Location has datatype text, County has datatype text, Year has datatype number which has Id and Given the Table csu fees having columns as Campus has datatype number, Year has datatype number, CampusFee has datatype number which has Campus and Given the Table degrees having columns as Year has datatype number, Campus has datatype number, Degrees has datatype number which has Year and Given the Table discipline enrollments having columns as Campus has datatype number, Discipline has datatype number, Year has datatype number, Undergraduate has datatype number, Graduate has datatype number which has Campus and Given the Table enrollments having columns as Campus has datatype number, Year has datatype number, TotalEnrollment_AY has datatype number, FTE_AY has datatype number which has Campus and Given the Table faculty having columns as Campus has datatype number, Year has datatype number, Faculty has datatype number which has NO_PRIMARY_KEY. Answer the question by writing the appropriate SQL code. 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"
|
Given the Table campuses having columns as Id has datatype number, Campus has datatype text, Location has datatype text, County has datatype text, Year has datatype number which has Id and Given the Table csu fees having columns as Campus has datatype number, Year has datatype number, CampusFee has datatype number which has Campus and Given the Table degrees having columns as Year has datatype number, Campus has datatype number, Degrees has datatype number which has Year and Given the Table discipline enrollments having columns as Campus has datatype number, Discipline has datatype number, Year has datatype number, Undergraduate has datatype number, Graduate has datatype number which has Campus and Given the Table enrollments having columns as Campus has datatype number, Year has datatype number, TotalEnrollment_AY has datatype number, FTE_AY has datatype number which has Campus and Given the Table faculty having columns as Campus has datatype number, Year has datatype number, Faculty has datatype number which has NO_PRIMARY_KEY. Answer the question by writing the appropriate SQL code. What is the number of faculty at Long Beach State University in 2002?
|
SELECT faculty FROM faculty AS T1 JOIN campuses AS T2 ON T1.campus = T2.id WHERE T1.year = 2004 AND T2.campus = "San Francisco State University"
|
Given the Table campuses having columns as Id has datatype number, Campus has datatype text, Location has datatype text, County has datatype text, Year has datatype number which has Id and Given the Table csu fees having columns as Campus has datatype number, Year has datatype number, CampusFee has datatype number which has Campus and Given the Table degrees having columns as Year has datatype number, Campus has datatype number, Degrees has datatype number which has Year and Given the Table discipline enrollments having columns as Campus has datatype number, Discipline has datatype number, Year has datatype number, Undergraduate has datatype number, Graduate has datatype number which has Campus and Given the Table enrollments having columns as Campus has datatype number, Year has datatype number, TotalEnrollment_AY has datatype number, FTE_AY has datatype number which has Campus and Given the Table faculty having columns as Campus has datatype number, Year has datatype number, Faculty has datatype number which has NO_PRIMARY_KEY. Answer the question by writing the appropriate SQL code. How many faculty lines are there in "San Francisco State University" in year 2004?
|
SELECT faculty FROM faculty AS T1 JOIN campuses AS T2 ON T1.campus = T2.id WHERE T1.year = 2004 AND T2.campus = "San Francisco State University"
|
Given the Table campuses having columns as Id has datatype number, Campus has datatype text, Location has datatype text, County has datatype text, Year has datatype number which has Id and Given the Table csu fees having columns as Campus has datatype number, Year has datatype number, CampusFee has datatype number which has Campus and Given the Table degrees having columns as Year has datatype number, Campus has datatype number, Degrees has datatype number which has Year and Given the Table discipline enrollments having columns as Campus has datatype number, Discipline has datatype number, Year has datatype number, Undergraduate has datatype number, Graduate has datatype number which has Campus and Given the Table enrollments having columns as Campus has datatype number, Year has datatype number, TotalEnrollment_AY has datatype number, FTE_AY has datatype number which has Campus and Given the Table faculty having columns as Campus has datatype number, Year has datatype number, Faculty has datatype number which has NO_PRIMARY_KEY. Answer the question by writing the appropriate SQL code. How many faculty lines are there at San Francisco State University in 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 T1.year = 2004
|
Given the Table campuses having columns as Id has datatype number, Campus has datatype text, Location has datatype text, County has datatype text, Year has datatype number which has Id and Given the Table csu fees having columns as Campus has datatype number, Year has datatype number, CampusFee has datatype number which has Campus and Given the Table degrees having columns as Year has datatype number, Campus has datatype number, Degrees has datatype number which has Year and Given the Table discipline enrollments having columns as Campus has datatype number, Discipline has datatype number, Year has datatype number, Undergraduate has datatype number, Graduate has datatype number which has Campus and Given the Table enrollments having columns as Campus has datatype number, Year has datatype number, TotalEnrollment_AY has datatype number, FTE_AY has datatype number which has Campus and Given the Table faculty having columns as Campus has datatype number, Year has datatype number, Faculty has datatype number which has NO_PRIMARY_KEY. Answer the question by writing the appropriate SQL code. 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 T1.year = 2004
|
Given the Table campuses having columns as Id has datatype number, Campus has datatype text, Location has datatype text, County has datatype text, Year has datatype number which has Id and Given the Table csu fees having columns as Campus has datatype number, Year has datatype number, CampusFee has datatype number which has Campus and Given the Table degrees having columns as Year has datatype number, Campus has datatype number, Degrees has datatype number which has Year and Given the Table discipline enrollments having columns as Campus has datatype number, Discipline has datatype number, Year has datatype number, Undergraduate has datatype number, Graduate has datatype number which has Campus and Given the Table enrollments having columns as Campus has datatype number, Year has datatype number, TotalEnrollment_AY has datatype number, FTE_AY has datatype number which has Campus and Given the Table faculty having columns as Campus has datatype number, Year has datatype number, Faculty has datatype number which has NO_PRIMARY_KEY. Answer the question by writing the appropriate SQL code. What are the campuses that had between 600 and 1000 faculty members in 2004?
|
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
|
Given the Table campuses having columns as Id has datatype number, Campus has datatype text, Location has datatype text, County has datatype text, Year has datatype number which has Id and Given the Table csu fees having columns as Campus has datatype number, Year has datatype number, CampusFee has datatype number which has Campus and Given the Table degrees having columns as Year has datatype number, Campus has datatype number, Degrees has datatype number which has Year and Given the Table discipline enrollments having columns as Campus has datatype number, Discipline has datatype number, Year has datatype number, Undergraduate has datatype number, Graduate has datatype number which has Campus and Given the Table enrollments having columns as Campus has datatype number, Year has datatype number, TotalEnrollment_AY has datatype number, FTE_AY has datatype number which has Campus and Given the Table faculty having columns as Campus has datatype number, Year has datatype number, Faculty has datatype number which has NO_PRIMARY_KEY. Answer the question by writing the appropriate SQL code. 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
|
Given the Table campuses having columns as Id has datatype number, Campus has datatype text, Location has datatype text, County has datatype text, Year has datatype number which has Id and Given the Table csu fees having columns as Campus has datatype number, Year has datatype number, CampusFee has datatype number which has Campus and Given the Table degrees having columns as Year has datatype number, Campus has datatype number, Degrees has datatype number which has Year and Given the Table discipline enrollments having columns as Campus has datatype number, Discipline has datatype number, Year has datatype number, Undergraduate has datatype number, Graduate has datatype number which has Campus and Given the Table enrollments having columns as Campus has datatype number, Year has datatype number, TotalEnrollment_AY has datatype number, FTE_AY has datatype number which has Campus and Given the Table faculty having columns as Campus has datatype number, Year has datatype number, Faculty has datatype number which has NO_PRIMARY_KEY. Answer the question by writing the appropriate SQL code. How many faculty members did the university that conferred the most degrees in 2002 have?
|
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 = 2001 ORDER BY t3.degrees LIMIT 1
|
Given the Table campuses having columns as Id has datatype number, Campus has datatype text, Location has datatype text, County has datatype text, Year has datatype number which has Id and Given the Table csu fees having columns as Campus has datatype number, Year has datatype number, CampusFee has datatype number which has Campus and Given the Table degrees having columns as Year has datatype number, Campus has datatype number, Degrees has datatype number which has Year and Given the Table discipline enrollments having columns as Campus has datatype number, Discipline has datatype number, Year has datatype number, Undergraduate has datatype number, Graduate has datatype number which has Campus and Given the Table enrollments having columns as Campus has datatype number, Year has datatype number, TotalEnrollment_AY has datatype number, FTE_AY has datatype number which has Campus and Given the Table faculty having columns as Campus has datatype number, Year has datatype number, Faculty has datatype number which has NO_PRIMARY_KEY. Answer the question by writing the appropriate SQL code. How many faculty lines are there in the university that conferred the least number of degrees in year 2001?
|
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 = 2001 ORDER BY t3.degrees LIMIT 1
|
Given the Table campuses having columns as Id has datatype number, Campus has datatype text, Location has datatype text, County has datatype text, Year has datatype number which has Id and Given the Table csu fees having columns as Campus has datatype number, Year has datatype number, CampusFee has datatype number which has Campus and Given the Table degrees having columns as Year has datatype number, Campus has datatype number, Degrees has datatype number which has Year and Given the Table discipline enrollments having columns as Campus has datatype number, Discipline has datatype number, Year has datatype number, Undergraduate has datatype number, Graduate has datatype number which has Campus and Given the Table enrollments having columns as Campus has datatype number, Year has datatype number, TotalEnrollment_AY has datatype number, FTE_AY has datatype number which has Campus and Given the Table faculty having columns as Campus has datatype number, Year has datatype number, Faculty has datatype number which has NO_PRIMARY_KEY. Answer the question by writing the appropriate SQL code. How many faculty members are at the university that gave the least number of degrees in 2001?
|
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"
|
Given the Table campuses having columns as Id has datatype number, Campus has datatype text, Location has datatype text, County has datatype text, Year has datatype number which has Id and Given the Table csu fees having columns as Campus has datatype number, Year has datatype number, CampusFee has datatype number which has Campus and Given the Table degrees having columns as Year has datatype number, Campus has datatype number, Degrees has datatype number which has Year and Given the Table discipline enrollments having columns as Campus has datatype number, Discipline has datatype number, Year has datatype number, Undergraduate has datatype number, Graduate has datatype number which has Campus and Given the Table enrollments having columns as Campus has datatype number, Year has datatype number, TotalEnrollment_AY has datatype number, FTE_AY has datatype number which has Campus and Given the Table faculty having columns as Campus has datatype number, Year has datatype number, Faculty has datatype number which has NO_PRIMARY_KEY. Answer the question by writing the appropriate SQL code. 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"
|
Given the Table campuses having columns as Id has datatype number, Campus has datatype text, Location has datatype text, County has datatype text, Year has datatype number which has Id and Given the Table csu fees having columns as Campus has datatype number, Year has datatype number, CampusFee has datatype number which has Campus and Given the Table degrees having columns as Year has datatype number, Campus has datatype number, Degrees has datatype number which has Year and Given the Table discipline enrollments having columns as Campus has datatype number, Discipline has datatype number, Year has datatype number, Undergraduate has datatype number, Graduate has datatype number which has Campus and Given the Table enrollments having columns as Campus has datatype number, Year has datatype number, TotalEnrollment_AY has datatype number, FTE_AY has datatype number which has Campus and Given the Table faculty having columns as Campus has datatype number, Year has datatype number, Faculty has datatype number which has NO_PRIMARY_KEY. Answer the question by writing the appropriate SQL code. How many undergraduates are there at San Jose State
|
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"
|
Given the Table campuses having columns as Id has datatype number, Campus has datatype text, Location has datatype text, County has datatype text, Year has datatype number which has Id and Given the Table csu fees having columns as Campus has datatype number, Year has datatype number, CampusFee has datatype number which has Campus and Given the Table degrees having columns as Year has datatype number, Campus has datatype number, Degrees has datatype number which has Year and Given the Table discipline enrollments having columns as Campus has datatype number, Discipline has datatype number, Year has datatype number, Undergraduate has datatype number, Graduate has datatype number which has Campus and Given the Table enrollments having columns as Campus has datatype number, Year has datatype number, TotalEnrollment_AY has datatype number, FTE_AY has datatype number which has Campus and Given the Table faculty having columns as Campus has datatype number, Year has datatype number, Faculty has datatype number which has NO_PRIMARY_KEY. Answer the question by writing the appropriate SQL code. 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"
|
Given the Table campuses having columns as Id has datatype number, Campus has datatype text, Location has datatype text, County has datatype text, Year has datatype number which has Id and Given the Table csu fees having columns as Campus has datatype number, Year has datatype number, CampusFee has datatype number which has Campus and Given the Table degrees having columns as Year has datatype number, Campus has datatype number, Degrees has datatype number which has Year and Given the Table discipline enrollments having columns as Campus has datatype number, Discipline has datatype number, Year has datatype number, Undergraduate has datatype number, Graduate has datatype number which has Campus and Given the Table enrollments having columns as Campus has datatype number, Year has datatype number, TotalEnrollment_AY has datatype number, FTE_AY has datatype number which has Campus and Given the Table faculty having columns as Campus has datatype number, Year has datatype number, Faculty has datatype number which has NO_PRIMARY_KEY. Answer the question by writing the appropriate SQL code. How many people graduated from San Francisco State University in 2004?
|
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
|
Given the Table campuses having columns as Id has datatype number, Campus has datatype text, Location has datatype text, County has datatype text, Year has datatype number which has Id and Given the Table csu fees having columns as Campus has datatype number, Year has datatype number, CampusFee has datatype number which has Campus and Given the Table degrees having columns as Year has datatype number, Campus has datatype number, Degrees has datatype number which has Year and Given the Table discipline enrollments having columns as Campus has datatype number, Discipline has datatype number, Year has datatype number, Undergraduate has datatype number, Graduate has datatype number which has Campus and Given the Table enrollments having columns as Campus has datatype number, Year has datatype number, TotalEnrollment_AY has datatype number, FTE_AY has datatype number which has Campus and Given the Table faculty having columns as Campus has datatype number, Year has datatype number, Faculty has datatype number which has NO_PRIMARY_KEY. Answer the question by writing the appropriate SQL code. 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
|
Given the Table campuses having columns as Id has datatype number, Campus has datatype text, Location has datatype text, County has datatype text, Year has datatype number which has Id and Given the Table csu fees having columns as Campus has datatype number, Year has datatype number, CampusFee has datatype number which has Campus and Given the Table degrees having columns as Year has datatype number, Campus has datatype number, Degrees has datatype number which has Year and Given the Table discipline enrollments having columns as Campus has datatype number, Discipline has datatype number, Year has datatype number, Undergraduate has datatype number, Graduate has datatype number which has Campus and Given the Table enrollments having columns as Campus has datatype number, Year has datatype number, TotalEnrollment_AY has datatype number, FTE_AY has datatype number which has Campus and Given the Table faculty having columns as Campus has datatype number, Year has datatype number, Faculty has datatype number which has NO_PRIMARY_KEY. Answer the question by writing the appropriate SQL code. In the year 2000, what is the campus fee for 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 Jose State University" AND t1.year = 2000
|
Given the Table campuses having columns as Id has datatype number, Campus has datatype text, Location has datatype text, County has datatype text, Year has datatype number which has Id and Given the Table csu fees having columns as Campus has datatype number, Year has datatype number, CampusFee has datatype number which has Campus and Given the Table degrees having columns as Year has datatype number, Campus has datatype number, Degrees has datatype number which has Year and Given the Table discipline enrollments having columns as Campus has datatype number, Discipline has datatype number, Year has datatype number, Undergraduate has datatype number, Graduate has datatype number which has Campus and Given the Table enrollments having columns as Campus has datatype number, Year has datatype number, TotalEnrollment_AY has datatype number, FTE_AY has datatype number which has Campus and Given the Table faculty having columns as Campus has datatype number, Year has datatype number, Faculty has datatype number which has NO_PRIMARY_KEY. Answer the question by writing the appropriate SQL code. Find the campus fee of "San Jose 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 Jose State University" AND t1.year = 2000
|
Given the Table campuses having columns as Id has datatype number, Campus has datatype text, Location has datatype text, County has datatype text, Year has datatype number which has Id and Given the Table csu fees having columns as Campus has datatype number, Year has datatype number, CampusFee has datatype number which has Campus and Given the Table degrees having columns as Year has datatype number, Campus has datatype number, Degrees has datatype number which has Year and Given the Table discipline enrollments having columns as Campus has datatype number, Discipline has datatype number, Year has datatype number, Undergraduate has datatype number, Graduate has datatype number which has Campus and Given the Table enrollments having columns as Campus has datatype number, Year has datatype number, TotalEnrollment_AY has datatype number, FTE_AY has datatype number which has Campus and Given the Table faculty having columns as Campus has datatype number, Year has datatype number, Faculty has datatype number which has NO_PRIMARY_KEY. Answer the question by writing the appropriate SQL code. What is the campus fee in the year 2000 for San Jose State University?
|
SELECT count(*) FROM campuses
|
Given the Table campuses having columns as Id has datatype number, Campus has datatype text, Location has datatype text, County has datatype text, Year has datatype number which has Id and Given the Table csu fees having columns as Campus has datatype number, Year has datatype number, CampusFee has datatype number which has Campus and Given the Table degrees having columns as Year has datatype number, Campus has datatype number, Degrees has datatype number which has Year and Given the Table discipline enrollments having columns as Campus has datatype number, Discipline has datatype number, Year has datatype number, Undergraduate has datatype number, Graduate has datatype number which has Campus and Given the Table enrollments having columns as Campus has datatype number, Year has datatype number, TotalEnrollment_AY has datatype number, FTE_AY has datatype number which has Campus and Given the Table faculty having columns as Campus has datatype number, Year has datatype number, Faculty has datatype number which has NO_PRIMARY_KEY. Answer the question by writing the appropriate SQL code. How many CSU campuses are there?
|
SELECT count(*) FROM campuses
|
Given the Table campuses having columns as Id has datatype number, Campus has datatype text, Location has datatype text, County has datatype text, Year has datatype number which has Id and Given the Table csu fees having columns as Campus has datatype number, Year has datatype number, CampusFee has datatype number which has Campus and Given the Table degrees having columns as Year has datatype number, Campus has datatype number, Degrees has datatype number which has Year and Given the Table discipline enrollments having columns as Campus has datatype number, Discipline has datatype number, Year has datatype number, Undergraduate has datatype number, Graduate has datatype number which has Campus and Given the Table enrollments having columns as Campus has datatype number, Year has datatype number, TotalEnrollment_AY has datatype number, FTE_AY has datatype number which has Campus and Given the Table faculty having columns as Campus has datatype number, Year has datatype number, Faculty has datatype number which has NO_PRIMARY_KEY. Answer the question by writing the appropriate SQL code. What is the total number of campuses?
|
SELECT count(*) FROM candidate
|
Given the Table candidate having columns as Candidate_ID has datatype number, People_ID has datatype number, Poll_Source has datatype text, Date has datatype text, Support_rate has datatype number, Consider_rate has datatype number, Oppose_rate has datatype number, Unsure_rate has datatype number which has Candidate_ID and Given the Table people having columns as People_ID has datatype number, Sex has datatype text, Name has datatype text, Date_of_Birth has datatype text, Height has datatype number, Weight has datatype number which has People_ID. Answer the question by writing the appropriate SQL code. How many candidates are there?
|
SELECT count(*) FROM candidate
|
Given the Table candidate having columns as Candidate_ID has datatype number, People_ID has datatype number, Poll_Source has datatype text, Date has datatype text, Support_rate has datatype number, Consider_rate has datatype number, Oppose_rate has datatype number, Unsure_rate has datatype number which has Candidate_ID and Given the Table people having columns as People_ID has datatype number, Sex has datatype text, Name has datatype text, Date_of_Birth has datatype text, Height has datatype number, Weight has datatype number which has People_ID. Answer the question by writing the appropriate SQL code. Count the number of candidates.
|
SELECT poll_source FROM candidate GROUP BY poll_source ORDER BY count(*) DESC LIMIT 1
|
Given the Table candidate having columns as Candidate_ID has datatype number, People_ID has datatype number, Poll_Source has datatype text, Date has datatype text, Support_rate has datatype number, Consider_rate has datatype number, Oppose_rate has datatype number, Unsure_rate has datatype number which has Candidate_ID and Given the Table people having columns as People_ID has datatype number, Sex has datatype text, Name has datatype text, Date_of_Birth has datatype text, Height has datatype number, Weight has datatype number which has People_ID. Answer the question by writing the appropriate SQL code. Which poll resource provided the most number of candidate information?
|
SELECT poll_source FROM candidate GROUP BY poll_source ORDER BY count(*) DESC LIMIT 1
|
Given the Table candidate having columns as Candidate_ID has datatype number, People_ID has datatype number, Poll_Source has datatype text, Date has datatype text, Support_rate has datatype number, Consider_rate has datatype number, Oppose_rate has datatype number, Unsure_rate has datatype number which has Candidate_ID and Given the Table people having columns as People_ID has datatype number, Sex has datatype text, Name has datatype text, Date_of_Birth has datatype text, Height has datatype number, Weight has datatype number which has People_ID. Answer the question by writing the appropriate SQL code. Return the poll resource associated with the most candidates.
|
SELECT support_rate FROM candidate ORDER BY support_rate DESC LIMIT 3
|
Given the Table candidate having columns as Candidate_ID has datatype number, People_ID has datatype number, Poll_Source has datatype text, Date has datatype text, Support_rate has datatype number, Consider_rate has datatype number, Oppose_rate has datatype number, Unsure_rate has datatype number which has Candidate_ID and Given the Table people having columns as People_ID has datatype number, Sex has datatype text, Name has datatype text, Date_of_Birth has datatype text, Height has datatype number, Weight has datatype number which has People_ID. Answer the question by writing the appropriate SQL code. what are the top 3 highest support rates?
|
SELECT support_rate FROM candidate ORDER BY support_rate DESC LIMIT 3
|
Given the Table candidate having columns as Candidate_ID has datatype number, People_ID has datatype number, Poll_Source has datatype text, Date has datatype text, Support_rate has datatype number, Consider_rate has datatype number, Oppose_rate has datatype number, Unsure_rate has datatype number which has Candidate_ID and Given the Table people having columns as People_ID has datatype number, Sex has datatype text, Name has datatype text, Date_of_Birth has datatype text, Height has datatype number, Weight has datatype number which has People_ID. Answer the question by writing the appropriate SQL code. Return the top 3 greatest support rates.
|
SELECT Candidate_ID FROM candidate ORDER BY oppose_rate LIMIT 1
|
Given the Table candidate having columns as Candidate_ID has datatype number, People_ID has datatype number, Poll_Source has datatype text, Date has datatype text, Support_rate has datatype number, Consider_rate has datatype number, Oppose_rate has datatype number, Unsure_rate has datatype number which has Candidate_ID and Given the Table people having columns as People_ID has datatype number, Sex has datatype text, Name has datatype text, Date_of_Birth has datatype text, Height has datatype number, Weight has datatype number which has People_ID. Answer the question by writing the appropriate SQL code. Find the id of the candidate who got the lowest oppose rate.
|
SELECT Candidate_ID FROM candidate ORDER BY oppose_rate LIMIT 1
|
Given the Table candidate having columns as Candidate_ID has datatype number, People_ID has datatype number, Poll_Source has datatype text, Date has datatype text, Support_rate has datatype number, Consider_rate has datatype number, Oppose_rate has datatype number, Unsure_rate has datatype number which has Candidate_ID and Given the Table people having columns as People_ID has datatype number, Sex has datatype text, Name has datatype text, Date_of_Birth has datatype text, Height has datatype number, Weight has datatype number which has People_ID. Answer the question by writing the appropriate SQL code. What is the id of the candidate with the lowest oppose rate?
|
SELECT Support_rate , Consider_rate , Oppose_rate FROM candidate ORDER BY unsure_rate
|
Given the Table candidate having columns as Candidate_ID has datatype number, People_ID has datatype number, Poll_Source has datatype text, Date has datatype text, Support_rate has datatype number, Consider_rate has datatype number, Oppose_rate has datatype number, Unsure_rate has datatype number which has Candidate_ID and Given the Table people having columns as People_ID has datatype number, Sex has datatype text, Name has datatype text, Date_of_Birth has datatype text, Height has datatype number, Weight has datatype number which has People_ID. Answer the question by writing the appropriate SQL code. Please list support, consider, and oppose rates for each candidate in ascending order by unsure rate.
|
SELECT Support_rate , Consider_rate , Oppose_rate FROM candidate ORDER BY unsure_rate
|
Given the Table candidate having columns as Candidate_ID has datatype number, People_ID has datatype number, Poll_Source has datatype text, Date has datatype text, Support_rate has datatype number, Consider_rate has datatype number, Oppose_rate has datatype number, Unsure_rate has datatype number which has Candidate_ID and Given the Table people having columns as People_ID has datatype number, Sex has datatype text, Name has datatype text, Date_of_Birth has datatype text, Height has datatype number, Weight has datatype number which has People_ID. Answer the question by writing the appropriate SQL code. What are the support, consider, and oppose rates of each candidate, ordered ascending by their unsure rate?
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.