query_id
int64 0
2.15k
| database_id
stringclasses 40
values | table_id
listlengths 1
4
| query
stringlengths 22
185
| answer
stringlengths 22
608
| difficulty
stringclasses 4
values |
---|---|---|---|---|---|
1,700 |
warehouse_1
|
[
"boxes"
] |
What are the different contents in boxes?
|
SELECT DISTINCT CONTENTS FROM boxes
|
easy
|
1,701 |
warehouse_1
|
[
"boxes"
] |
Find the number of all distinct contents in all the boxes.
|
SELECT count(DISTINCT CONTENTS) FROM boxes
|
easy
|
1,702 |
warehouse_1
|
[
"boxes"
] |
How many different contents are stored in boxes?
|
SELECT count(DISTINCT CONTENTS) FROM boxes
|
easy
|
1,703 |
warehouse_1
|
[
"warehouses"
] |
Find all distinct locations of warehouses.
|
SELECT count(DISTINCT LOCATION) FROM warehouses
|
easy
|
1,704 |
warehouse_1
|
[
"warehouses"
] |
What are the different locations of warehouses?
|
SELECT count(DISTINCT LOCATION) FROM warehouses
|
easy
|
1,705 |
warehouse_1
|
[
"boxes",
"warehouses"
] |
Find the code of boxes that are stored at the warehouses located at Chicago or New York.
|
SELECT T1.code FROM boxes AS T1 JOIN warehouses AS T2 ON T1.warehouse = T2.code WHERE T2.location = 'Chicago' OR T2.location = 'New York'
|
hard
|
1,706 |
warehouse_1
|
[
"boxes",
"warehouses"
] |
What are the codes of boxes stored in warehouses in either Chicago or New York?
|
SELECT T1.code FROM boxes AS T1 JOIN warehouses AS T2 ON T1.warehouse = T2.code WHERE T2.location = 'Chicago' OR T2.location = 'New York'
|
hard
|
1,707 |
warehouse_1
|
[
"boxes",
"warehouses"
] |
Find the total value of boxes in the warehouses located at Chicago or New York.
|
SELECT sum(T1.value) FROM boxes AS T1 JOIN warehouses AS T2 ON T1.warehouse = T2.code WHERE T2.location = 'Chicago' OR T2.location = 'New York'
|
hard
|
1,708 |
warehouse_1
|
[
"boxes",
"warehouses"
] |
What is the total value of boxes located in Chicago or New York?
|
SELECT sum(T1.value) FROM boxes AS T1 JOIN warehouses AS T2 ON T1.warehouse = T2.code WHERE T2.location = 'Chicago' OR T2.location = 'New York'
|
hard
|
1,709 |
warehouse_1
|
[
"boxes",
"warehouses"
] |
Find all contents present in warehouses located in Chicago and those located in New York.
|
SELECT T1.contents FROM boxes AS T1 JOIN warehouses AS T2 ON T1.warehouse = T2.code WHERE T2.location = 'Chicago' INTERSECT SELECT T1.contents FROM boxes AS T1 JOIN warehouses AS T2 ON T1.warehouse = T2.code WHERE T2.location = 'New York'
|
extra
|
1,710 |
warehouse_1
|
[
"boxes",
"warehouses"
] |
Find the contents that are stored in both Chicago and New York.
|
SELECT T1.contents FROM boxes AS T1 JOIN warehouses AS T2 ON T1.warehouse = T2.code WHERE T2.location = 'Chicago' INTERSECT SELECT T1.contents FROM boxes AS T1 JOIN warehouses AS T2 ON T1.warehouse = T2.code WHERE T2.location = 'New York'
|
extra
|
1,711 |
warehouse_1
|
[
"boxes",
"warehouses"
] |
Find the type of contents that are not in the warehouses located at New York.
|
SELECT CONTENTS FROM boxes EXCEPT SELECT T1.contents FROM boxes AS T1 JOIN warehouses AS T2 ON T1.warehouse = T2.code WHERE T2.location = 'New York'
|
hard
|
1,712 |
warehouse_1
|
[
"boxes",
"warehouses"
] |
What types of contents cannot be found in warehouses in New York?
|
SELECT CONTENTS FROM boxes EXCEPT SELECT T1.contents FROM boxes AS T1 JOIN warehouses AS T2 ON T1.warehouse = T2.code WHERE T2.location = 'New York'
|
hard
|
1,713 |
warehouse_1
|
[
"boxes",
"warehouses"
] |
Find the location of the warehouses which have contents Rocks but not Scissors.
|
SELECT T2.location FROM boxes AS T1 JOIN warehouses AS T2 ON T1.warehouse = T2.code WHERE T1.contents = 'Rocks' EXCEPT SELECT T2.location FROM boxes AS T1 JOIN warehouses AS T2 ON T1.warehouse = T2.code WHERE T1.contents = 'Scissors'
|
extra
|
1,714 |
warehouse_1
|
[
"boxes",
"warehouses"
] |
What are the locations of warehouses that have boxes containing Rocks but not Scissors?
|
SELECT T2.location FROM boxes AS T1 JOIN warehouses AS T2 ON T1.warehouse = T2.code WHERE T1.contents = 'Rocks' EXCEPT SELECT T2.location FROM boxes AS T1 JOIN warehouses AS T2 ON T1.warehouse = T2.code WHERE T1.contents = 'Scissors'
|
extra
|
1,715 |
warehouse_1
|
[
"boxes"
] |
Find the warehouses which store contents Rocks or Scissors.
|
SELECT DISTINCT warehouse FROM boxes WHERE CONTENTS = 'Rocks' OR CONTENTS = 'Scissors'
|
medium
|
1,716 |
warehouse_1
|
[
"boxes"
] |
What are the distinct warehouses that have boxes with Rocks or Scissors as contents?
|
SELECT DISTINCT warehouse FROM boxes WHERE CONTENTS = 'Rocks' OR CONTENTS = 'Scissors'
|
medium
|
1,717 |
warehouse_1
|
[
"boxes",
"warehouses"
] |
Find the location of the warehouses which store contents Rocks and Scissors.
|
SELECT T2.location FROM boxes AS T1 JOIN warehouses AS T2 ON T1.warehouse = T2.code WHERE T1.contents = 'Rocks' INTERSECT SELECT T2.location FROM boxes AS T1 JOIN warehouses AS T2 ON T1.warehouse = T2.code WHERE T1.contents = 'Scissors'
|
extra
|
1,718 |
warehouse_1
|
[
"boxes",
"warehouses"
] |
What are the locations of warehouses in which boxes that contain Rocks and Scissors are kept?
|
SELECT T2.location FROM boxes AS T1 JOIN warehouses AS T2 ON T1.warehouse = T2.code WHERE T1.contents = 'Rocks' INTERSECT SELECT T2.location FROM boxes AS T1 JOIN warehouses AS T2 ON T1.warehouse = T2.code WHERE T1.contents = 'Scissors'
|
extra
|
1,719 |
warehouse_1
|
[
"boxes"
] |
List the code and contents of all boxes sorted by their values.
|
SELECT code , CONTENTS FROM boxes ORDER BY value
|
medium
|
1,720 |
warehouse_1
|
[
"boxes"
] |
What are the codes and corresponding contents of all the boxes, ordered by their values?
|
SELECT code , CONTENTS FROM boxes ORDER BY value
|
medium
|
1,721 |
warehouse_1
|
[
"boxes"
] |
Find the code and contents of the box with the lowest value.
|
SELECT code , CONTENTS FROM boxes ORDER BY value LIMIT 1
|
medium
|
1,722 |
warehouse_1
|
[
"boxes"
] |
What is the code and contents for the box that has the smallest value?
|
SELECT code , CONTENTS FROM boxes ORDER BY value LIMIT 1
|
medium
|
1,723 |
warehouse_1
|
[
"boxes"
] |
Find the unique contents of all boxes whose value is higher than the average value of all boxes.
|
SELECT DISTINCT CONTENTS FROM boxes WHERE value > (SELECT avg(value) FROM boxes)
|
hard
|
1,724 |
warehouse_1
|
[
"boxes"
] |
What are the different contents of boxes for which the value is higher than the average value across all boxes?
|
SELECT DISTINCT CONTENTS FROM boxes WHERE value > (SELECT avg(value) FROM boxes)
|
hard
|
1,725 |
warehouse_1
|
[
"boxes"
] |
List all different types of contents ordered by contents.
|
SELECT DISTINCT CONTENTS FROM boxes ORDER BY CONTENTS
|
easy
|
1,726 |
warehouse_1
|
[
"boxes"
] |
What are the different contents of boxes, ordered alphabetically?
|
SELECT DISTINCT CONTENTS FROM boxes ORDER BY CONTENTS
|
easy
|
1,727 |
warehouse_1
|
[
"boxes"
] |
Find the code of all boxes whose value is higher than the value of any boxes with Rocks as content.
|
SELECT code FROM boxes WHERE value > (SELECT min(value) FROM boxes WHERE CONTENTS = 'Rocks')
|
hard
|
1,728 |
warehouse_1
|
[
"boxes"
] |
What are the codes of boxes for which the value is greater than the value of any box that contains Rocks?
|
SELECT code FROM boxes WHERE value > (SELECT min(value) FROM boxes WHERE CONTENTS = 'Rocks')
|
hard
|
1,729 |
warehouse_1
|
[
"boxes"
] |
Find the code and content of all boxes whose value is higher than the value of all boxes with Scissors as content.
|
SELECT code , CONTENTS FROM boxes WHERE value > (SELECT max(value) FROM boxes WHERE CONTENTS = 'Scissors')
|
extra
|
1,730 |
warehouse_1
|
[
"boxes"
] |
What are the codes and corresponding contents of boxes for which their value is higher than the values of all boxes containing Scissors?
|
SELECT code , CONTENTS FROM boxes WHERE value > (SELECT max(value) FROM boxes WHERE CONTENTS = 'Scissors')
|
extra
|
1,731 |
warehouse_1
|
[
"boxes",
"warehouses"
] |
Find the total value of boxes stored in the warehouse with the largest capacity.
|
SELECT sum(T1.value) FROM boxes AS T1 JOIN warehouses AS T2 ON T1.warehouse = T2.code ORDER BY T2.capacity DESC LIMIT 1
|
hard
|
1,732 |
warehouse_1
|
[
"boxes",
"warehouses"
] |
What is the total value of boxes kept in the warehouse with the greatest capacity?
|
SELECT sum(T1.value) FROM boxes AS T1 JOIN warehouses AS T2 ON T1.warehouse = T2.code ORDER BY T2.capacity DESC LIMIT 1
|
hard
|
1,733 |
warehouse_1
|
[
"boxes"
] |
Select the warehouse code and the average value of the boxes only for those warehouses where the average value of the boxes is greater than 150.
|
SELECT warehouse , avg(value) FROM boxes GROUP BY warehouse HAVING avg(value) > 150
|
medium
|
1,734 |
warehouse_1
|
[
"boxes"
] |
What are the average values of boxes for each warehouse than has an average value greater than 150?
|
SELECT warehouse , avg(value) FROM boxes GROUP BY warehouse HAVING avg(value) > 150
|
medium
|
1,735 |
warehouse_1
|
[
"boxes"
] |
Find the total value and number of boxes for each content type.
|
SELECT sum(value) , count(*) , CONTENTS FROM boxes GROUP BY CONTENTS
|
medium
|
1,736 |
warehouse_1
|
[
"boxes"
] |
For each content, what is the total value and number of boxes?
|
SELECT sum(value) , count(*) , CONTENTS FROM boxes GROUP BY CONTENTS
|
medium
|
1,737 |
warehouse_1
|
[
"warehouses"
] |
Find the total, average, and maximum capacity for different locations.
|
SELECT sum(capacity) , avg(capacity) , max(capacity) , LOCATION FROM warehouses GROUP BY LOCATION
|
medium
|
1,738 |
warehouse_1
|
[
"warehouses"
] |
For each location, what are the total, average, and maximum capacities of warehouses?
|
SELECT sum(capacity) , avg(capacity) , max(capacity) , LOCATION FROM warehouses GROUP BY LOCATION
|
medium
|
1,739 |
warehouse_1
|
[
"warehouses"
] |
Find the total capacity of all warehouse locations.
|
SELECT sum(capacity) FROM warehouses
|
easy
|
1,740 |
warehouse_1
|
[
"warehouses"
] |
What is the total capacity of all warehouses?
|
SELECT sum(capacity) FROM warehouses
|
easy
|
1,741 |
warehouse_1
|
[
"boxes",
"warehouses"
] |
Find the value of the most expensive boxes saved in each warehouse location.
|
SELECT max(T1.value) , T2.location FROM boxes AS T1 JOIN warehouses AS T2 ON T1.warehouse = T2.code GROUP BY T2.location
|
medium
|
1,742 |
warehouse_1
|
[
"boxes",
"warehouses"
] |
For each warehouse location, what is the value of the most expensive box?
|
SELECT max(T1.value) , T2.location FROM boxes AS T1 JOIN warehouses AS T2 ON T1.warehouse = T2.code GROUP BY T2.location
|
medium
|
1,743 |
warehouse_1
|
[
"boxes"
] |
Select the warehouse codes along with the number of boxes in each warehouse.
|
SELECT Warehouse , count(*) FROM boxes GROUP BY warehouse
|
medium
|
1,744 |
warehouse_1
|
[
"boxes"
] |
How many boxes are there with each warehouse ?
|
select warehouse , count(*) from boxes group by warehouse
|
medium
|
1,745 |
warehouse_1
|
[
"boxes",
"warehouses"
] |
Find the number of different locations where Rocks are stored.
|
SELECT count(DISTINCT LOCATION) FROM boxes AS T1 JOIN warehouses AS T2 ON T1.warehouse = T2.code WHERE T1.contents = 'Rocks'
|
medium
|
1,746 |
warehouse_1
|
[
"boxes",
"warehouses"
] |
In how many different warehouses are Rocks stored within boxes?
|
SELECT count(DISTINCT LOCATION) FROM boxes AS T1 JOIN warehouses AS T2 ON T1.warehouse = T2.code WHERE T1.contents = 'Rocks'
|
medium
|
1,747 |
warehouse_1
|
[
"boxes",
"warehouses"
] |
Select the code of each box, along with the name of the city the box is located in.
|
SELECT T1.code , T2.location FROM boxes AS T1 JOIN warehouses AS T2 ON T1.Warehouse = T2.Code
|
medium
|
1,748 |
warehouse_1
|
[
"boxes",
"warehouses"
] |
What are the codes of all boxes, as well as the locations of the warehouses they are in?
|
SELECT T1.code , T2.location FROM boxes AS T1 JOIN warehouses AS T2 ON T1.Warehouse = T2.Code
|
medium
|
1,749 |
warehouse_1
|
[
"boxes",
"warehouses"
] |
Select the codes of all the boxes located in Chicago.
|
SELECT T1.code FROM boxes AS T1 JOIN Warehouses AS T2 ON T1.warehouse = T2.code WHERE T2.location = 'Chicago'
|
medium
|
1,750 |
warehouse_1
|
[
"boxes",
"warehouses"
] |
What are the codes of boxes stored in warehouses in Chicago?
|
SELECT T1.code FROM boxes AS T1 JOIN Warehouses AS T2 ON T1.warehouse = T2.code WHERE T2.location = 'Chicago'
|
medium
|
1,751 |
warehouse_1
|
[
"boxes"
] |
Find the number of boxes saved in each warehouse.
|
SELECT count(*) , warehouse FROM boxes GROUP BY warehouse
|
medium
|
1,752 |
warehouse_1
|
[
"boxes"
] |
How many boxes are stored in each warehouse?
|
SELECT count(*) , warehouse FROM boxes GROUP BY warehouse
|
medium
|
1,753 |
warehouse_1
|
[
"boxes"
] |
Find the number of distinct types of contents in each warehouse.
|
SELECT count(DISTINCT CONTENTS) , warehouse FROM boxes GROUP BY warehouse
|
medium
|
1,754 |
warehouse_1
|
[
"boxes"
] |
How many different types of contents are stored in each warehouse?
|
SELECT count(DISTINCT CONTENTS) , warehouse FROM boxes GROUP BY warehouse
|
medium
|
1,755 |
warehouse_1
|
[
"boxes",
"warehouses"
] |
Select the codes of all warehouses that are above capacity.
|
SELECT T2.code FROM boxes AS T1 JOIN Warehouses AS T2 ON T1.warehouse = T2.code GROUP BY T2.code HAVING count(*) > T2.capacity
|
medium
|
1,756 |
warehouse_1
|
[
"boxes",
"warehouses"
] |
What are the codes of warehouses that have more boxes than their capacity?
|
SELECT T2.code FROM boxes AS T1 JOIN Warehouses AS T2 ON T1.warehouse = T2.code GROUP BY T2.code HAVING count(*) > T2.capacity
|
medium
|
1,757 |
warehouse_1
|
[
"boxes",
"warehouses"
] |
Find the total values of boxes that are not in the warehouses located at Chicago.
|
SELECT sum(T1.value) FROM boxes AS T1 JOIN Warehouses AS T2 ON T1.warehouse = T2.code WHERE T2.location != 'Chicago'
|
medium
|
1,758 |
warehouse_1
|
[
"boxes",
"warehouses"
] |
What is the total value of boxes contained in any location but Chicago?
|
SELECT sum(T1.value) FROM boxes AS T1 JOIN Warehouses AS T2 ON T1.warehouse = T2.code WHERE T2.location != 'Chicago'
|
medium
|
1,759 |
university_rank
|
[
"university"
] |
Show name, city, and state for all universities in alphabetical order of university name.
|
SELECT university_name , city , state FROM University ORDER BY university_name
|
medium
|
1,760 |
university_rank
|
[
"university"
] |
What are the names, cities, and states of all universities in alphabetical order (by name of the university).
|
SELECT university_name , city , state FROM University ORDER BY university_name
|
medium
|
1,761 |
university_rank
|
[
"university"
] |
How many universities are in Illinois or Ohio?
|
SELECT count(*) FROM University WHERE state = 'Illinois' OR state = 'Ohio'
|
medium
|
1,762 |
university_rank
|
[
"university"
] |
What is the total number of universities located in Illinois or Ohio?
|
SELECT count(*) FROM University WHERE state = 'Illinois' OR state = 'Ohio'
|
medium
|
1,763 |
university_rank
|
[
"university"
] |
What is the maximum, average, and minimum enrollment for universities?
|
SELECT max(enrollment) , avg(enrollment) , min(enrollment) FROM University
|
medium
|
1,764 |
university_rank
|
[
"university"
] |
What is the maximum, average, and minimum enrollment for all universities?
|
SELECT max(enrollment) , avg(enrollment) , min(enrollment) FROM University
|
medium
|
1,765 |
university_rank
|
[
"university"
] |
List team name for all universities with enrollments above the average.
|
SELECT team_name FROM University WHERE enrollment > (SELECT avg(enrollment) FROM University)
|
hard
|
1,766 |
university_rank
|
[
"university"
] |
What are the names of all teams from universities that have more people enrolled than average ?
|
select team_name from university where enrollment > (select avg(enrollment) from university)
|
hard
|
1,767 |
university_rank
|
[
"university"
] |
Show all home conferences.
|
SELECT DISTINCT home_conference FROM University
|
easy
|
1,768 |
university_rank
|
[
"university"
] |
What are the different home conferences from the university table?
|
SELECT DISTINCT home_conference FROM University
|
easy
|
1,769 |
university_rank
|
[
"university"
] |
Show all home conferences and the number of universities in each conference.
|
SELECT home_conference , count(*) FROM University GROUP BY home_conference
|
medium
|
1,770 |
university_rank
|
[
"university"
] |
For every home conference, how many universities attended that conference?
|
SELECT home_conference , count(*) FROM University GROUP BY home_conference
|
medium
|
1,771 |
university_rank
|
[
"university"
] |
Which state has most number of universities?
|
SELECT state FROM University GROUP BY state ORDER BY count(*) DESC LIMIT 1
|
hard
|
1,772 |
university_rank
|
[
"university"
] |
What is the state with the most universities?
|
SELECT state FROM University GROUP BY state ORDER BY count(*) DESC LIMIT 1
|
hard
|
1,773 |
university_rank
|
[
"university"
] |
Show all home conferences with average enrollment of universities above 2000.
|
SELECT home_conference FROM University GROUP BY home_conference HAVING avg(enrollment) > 2000
|
easy
|
1,774 |
university_rank
|
[
"university"
] |
What are the home conferences that have an average university enrollment above 2000?
|
SELECT home_conference FROM University GROUP BY home_conference HAVING avg(enrollment) > 2000
|
easy
|
1,775 |
university_rank
|
[
"university"
] |
Which conference has the least number of total enrollment?
|
SELECT home_conference FROM University GROUP BY home_conference ORDER BY sum(enrollment) LIMIT 1
|
hard
|
1,776 |
university_rank
|
[
"university"
] |
What are the home conferences with the fewest number of people enrolled?
|
SELECT home_conference FROM University GROUP BY home_conference ORDER BY sum(enrollment) LIMIT 1
|
hard
|
1,777 |
university_rank
|
[
"major"
] |
List all major name and major code in the order of their major code
|
SELECT major_name , major_code FROM Major ORDER BY major_code
|
medium
|
1,778 |
university_rank
|
[
"major"
] |
What are the names and codes for all majors ordered by their code?
|
SELECT major_name , major_code FROM Major ORDER BY major_code
|
medium
|
1,779 |
university_rank
|
[
"major_ranking",
"university",
"major"
] |
Show all majors and major ranks for the university with name Augustana College.
|
SELECT T1.rank , T3.major_name FROM Major_Ranking AS T1 JOIN University AS T2 JOIN Major AS T3 ON T1.university_id = T2.university_id AND T1.major_id = T3.major_id WHERE T2.university_name = 'Augustana College'
|
hard
|
1,780 |
university_rank
|
[
"major_ranking",
"university",
"major"
] |
What are the ranks and names of all majors at Augustana College?
|
SELECT T1.rank , T3.major_name FROM Major_Ranking AS T1 JOIN University AS T2 JOIN Major AS T3 ON T1.university_id = T2.university_id AND T1.major_id = T3.major_id WHERE T2.university_name = 'Augustana College'
|
hard
|
1,781 |
university_rank
|
[
"major_ranking",
"university",
"major"
] |
What is the name, city, state of the university with a rank 1 on Accounting major?
|
SELECT T2.university_name , T2.city , T2.state FROM Major_Ranking AS T1 JOIN University AS T2 JOIN Major AS T3 ON T1.university_id = T2.university_id AND T1.major_id = T3.major_id WHERE T1.rank = 1 AND T3.major_name = 'Accounting'
|
hard
|
1,782 |
university_rank
|
[
"major_ranking",
"university",
"major"
] |
What is the name, city, and state of the university with number 1 ranked Accounting major?
|
SELECT T2.university_name , T2.city , T2.state FROM Major_Ranking AS T1 JOIN University AS T2 JOIN Major AS T3 ON T1.university_id = T2.university_id AND T1.major_id = T3.major_id WHERE T1.rank = 1 AND T3.major_name = 'Accounting'
|
hard
|
1,783 |
university_rank
|
[
"major_ranking",
"university"
] |
What is the name of the university that has most number of majors with rank 1?
|
SELECT T2.university_name FROM Major_Ranking AS T1 JOIN University AS T2 ON T1.university_id = T2.university_id WHERE T1.rank = 1 GROUP BY T2.university_name ORDER BY count(*) DESC LIMIT 1
|
extra
|
1,784 |
university_rank
|
[
"major_ranking",
"university"
] |
What is the name of the university with the most majors ranked number 1?
|
SELECT T2.university_name FROM Major_Ranking AS T1 JOIN University AS T2 ON T1.university_id = T2.university_id WHERE T1.rank = 1 GROUP BY T2.university_name ORDER BY count(*) DESC LIMIT 1
|
extra
|
1,785 |
university_rank
|
[
"major_ranking",
"university"
] |
Show all university names without a major with rank 1?
|
SELECT university_name FROM University EXCEPT SELECT T2.university_name FROM Major_Ranking AS T1 JOIN University AS T2 ON T1.university_id = T2.university_id WHERE T1.rank = 1
|
hard
|
1,786 |
university_rank
|
[
"major_ranking",
"university"
] |
What are the names of all universities without any majors ranked number 1?
|
SELECT university_name FROM University EXCEPT SELECT T2.university_name FROM Major_Ranking AS T1 JOIN University AS T2 ON T1.university_id = T2.university_id WHERE T1.rank = 1
|
hard
|
1,787 |
university_rank
|
[
"major_ranking",
"university",
"major"
] |
Show all university names with both major Accounting and major Urban Education.
|
SELECT T2.university_name FROM Major_Ranking AS T1 JOIN University AS T2 JOIN Major AS T3 ON T1.university_id = T2.university_id AND T1.major_id = T3.major_id WHERE T3.major_name = 'Accounting' INTERSECT SELECT T2.university_name FROM Major_Ranking AS T1 JOIN University AS T2 JOIN Major AS T3 ON T1.university_id = T2.university_id AND T1.major_id = T3.major_id WHERE T3.major_name = 'Urban Education'
|
extra
|
1,788 |
university_rank
|
[
"major_ranking",
"university",
"major"
] |
What are the names of all universities that have both Accounting and Urban Education majors?
|
SELECT T2.university_name FROM Major_Ranking AS T1 JOIN University AS T2 JOIN Major AS T3 ON T1.university_id = T2.university_id AND T1.major_id = T3.major_id WHERE T3.major_name = 'Accounting' INTERSECT SELECT T2.university_name FROM Major_Ranking AS T1 JOIN University AS T2 JOIN Major AS T3 ON T1.university_id = T2.university_id AND T1.major_id = T3.major_id WHERE T3.major_name = 'Urban Education'
|
extra
|
1,789 |
university_rank
|
[
"overall_ranking",
"university"
] |
What is the name and overall ranking of universities in Wisconsin state?
|
SELECT T1.university_name , T2.rank FROM University AS T1 JOIN Overall_ranking AS T2 ON T1.university_id = T2.university_id WHERE T1.state = 'Wisconsin'
|
medium
|
1,790 |
university_rank
|
[
"overall_ranking",
"university"
] |
What is the name and rank of every university in Wisconsin?
|
SELECT T1.university_name , T2.rank FROM University AS T1 JOIN Overall_ranking AS T2 ON T1.university_id = T2.university_id WHERE T1.state = 'Wisconsin'
|
medium
|
1,791 |
university_rank
|
[
"overall_ranking",
"university"
] |
What is the university name with highest research point?
|
SELECT T1.university_name FROM University AS T1 JOIN Overall_ranking AS T2 ON T1.university_id = T2.university_id ORDER BY T2.research_point DESC LIMIT 1
|
hard
|
1,792 |
university_rank
|
[
"overall_ranking",
"university"
] |
What is the name of the university with the most research points?
|
SELECT T1.university_name FROM University AS T1 JOIN Overall_ranking AS T2 ON T1.university_id = T2.university_id ORDER BY T2.research_point DESC LIMIT 1
|
hard
|
1,793 |
university_rank
|
[
"overall_ranking",
"university"
] |
List all university names in ascending order of their reputation points.
|
SELECT T1.university_name FROM University AS T1 JOIN Overall_ranking AS T2 ON T1.university_id = T2.university_id ORDER BY T2.reputation_point
|
medium
|
1,794 |
university_rank
|
[
"overall_ranking",
"university"
] |
What are the names of all universities in ascending order of reputation points?
|
SELECT T1.university_name FROM University AS T1 JOIN Overall_ranking AS T2 ON T1.university_id = T2.university_id ORDER BY T2.reputation_point
|
medium
|
1,795 |
university_rank
|
[
"major_ranking",
"university",
"major"
] |
What is the name of university with major Accounting ranked 3 or above?
|
SELECT T2.university_name FROM Major_Ranking AS T1 JOIN University AS T2 JOIN Major AS T3 ON T1.university_id = T2.university_id AND T1.major_id = T3.major_id WHERE T1.rank <= 3 AND T3.major_name = "Accounting"
|
hard
|
1,796 |
university_rank
|
[
"major_ranking",
"university",
"major"
] |
What are the names of the university with an Accounting major ranked 3 or higher?
|
SELECT T2.university_name FROM Major_Ranking AS T1 JOIN University AS T2 JOIN Major AS T3 ON T1.university_id = T2.university_id AND T1.major_id = T3.major_id WHERE T1.rank <= 3 AND T3.major_name = "Accounting"
|
hard
|
1,797 |
university_rank
|
[
"overall_ranking",
"university"
] |
What is the total enrollment of universities with a overall rank 5 or below?
|
SELECT sum(enrollment) FROM University AS T1 JOIN Overall_ranking AS T2 ON T1.university_id = T2.university_id WHERE T2.rank >= 5
|
medium
|
1,798 |
university_rank
|
[
"overall_ranking",
"university"
] |
What is the total number of students enrolled in an university with a rank of 5 or below?
|
SELECT sum(enrollment) FROM University AS T1 JOIN Overall_ranking AS T2 ON T1.university_id = T2.university_id WHERE T2.rank >= 5
|
medium
|
1,799 |
university_rank
|
[
"overall_ranking",
"university"
] |
Find the name and Citation point of the universities whose reputation points are top 3 and above.
|
SELECT T1.University_Name , T2.Citation_point FROM University AS T1 JOIN Overall_ranking AS T2 ON T1.university_id = T2.university_id ORDER BY T2.Reputation_point DESC LIMIT 3
|
hard
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.