index
int32
0
1.03k
db_id
stringclasses
20 values
question
stringlengths
18
174
db_info
stringlengths
1
1.79k
ground_truth
stringlengths
20
474
800
world_1
What are the names and areas of countries with the top 5 largest area?
| country: surfacearea, name, code, continent, region, indepyear, population, lifeexpectancy, gnp, gnpold, localname, governmentform, headofstate, capital, code2 | city: id, name, countrycode, district, population | sqlite_sequence: name, seq | countrylanguage: countrycode, language, isofficial, percentage | city.countrycode=country.code | countrylanguage.countrycode=country.code |
select name , surfacearea from country order by surfacearea desc limit 5
801
world_1
Return the names and surface areas of the 5 largest countries.
| country: name, surfacearea, code | city: countrycode, id, name, district, population | countrylanguage: countrycode, language, isofficial, percentage | country: continent, region, indepyear, population, lifeexpectancy, gnp, gnpold, localname, governmentform, headofstate, capital, code2 | sqlite_sequence: name, seq |
select name , surfacearea from country order by surfacearea desc limit 5
802
world_1
What are names of countries with the top 3 largest population?
| country: population, name, code | city: countrycode | countrylanguage: countrycode | sqlite_sequence: name, seq | city.countrycode = country.code | countrylanguage.countrycode = country.code |
select name from country order by population desc limit 3
803
world_1
Return the names of the 3 most populated countries.
| country: population, name, code, continent, region, surfacearea, indepyear, lifeexpectancy, gnp, gnpold, localname, governmentform, headofstate, capital, code2 | city: countrycode, name, id, district, population | countrylanguage: countrycode, language, isofficial, percentage | sqlite_sequence: name, seq |
select name from country order by population desc limit 3
804
world_1
What are the names of the nations with the 3 lowest populations?
| country: name, population, code | city: countrycode | countrylanguage: countrycode | city.countrycode = country.code | countrylanguage.countrycode = country.code |
select name from country order by population asc limit 3
805
world_1
Return the names of the 3 countries with the fewest people.
| country: name, population, code, continent, region, surfacearea, indepyear, lifeexpectancy, gnp, gnpold, localname, governmentform, headofstate, capital, code2 | city: countrycode, id, name, district, population | countrylanguage: countrycode, language, isofficial, percentage | sqlite_sequence: name, seq | city.countrycode = country.code | countrylanguage.countrycode = country.code |
select name from country order by population asc limit 3
806
world_1
how many countries are in Asia?
| country: continent, name | city: id , name , countrycode , district , population | sqlite_sequence: name, seq | country: code, region, surfacearea, indepyear, population, lifeexpectancy, gnp, gnpold, localname, governmentform, headofstate, capital, code2 | countrylanguage: countrycode, language, isofficial, percentage | city.countrycode = country.code | countrylanguage.countrycode = country.code |
select count ( * ) from country where continent = 'Asia'
807
world_1
Count the number of countries in Asia.
| country: continent, name |
select count ( * ) from country where continent = 'Asia'
808
world_1
What are the names of the countries that are in the continent of Europe and have a population of 80000?
| country: continent, name, population |
select name from country where continent = 'Europe' and population = '80000'
809
world_1
Give the names of countries that are in Europe and have a population equal to 80000.
| country: name, continent, population, code, region, surfacearea, indepyear, lifeexpectancy, gnp, gnpold, localname, governmentform, headofstate, capital, code2 | city: id , name , countrycode , district , population | sqlite_sequence : name , seq | countrylanguage : countrycode , language , isofficial , percentage | city.countrycode = country.code | countrylanguage.countrycode = country.code |
select name from country where continent = 'Europe' and population = '80000'
810
world_1
What is the total population and average area of countries in the continent of North America whose area is bigger than 3000 ?
| country: continent, surfacearea, population, code, name, region, indepyear, lifeexpectancy, gnp, gnpold, localname, governmentform, headofstate, capital, code2 | city: id, name, countrycode, district, population | sqlite_sequence: name, seq | countrylanguage: countrycode, language, isofficial, percentage | city.countrycode = country.code | countrylanguage.countrycode = country.code |
select sum ( population ) , avg ( surfacearea ) from country where continent = 'north america' and surfacearea > 3000
811
world_1
Give the total population and average surface area corresponding to countries in North America that have a surface area greater than 3000 .
| country: continent, surfacearea, population, code, name, region, indepyear, lifeexpectancy, gnp, gnpold, localname, governmentform, headofstate, capital, code2 | city: id, name, countrycode, district, population | sqlite_sequence: name, seq | countrylanguage: countrycode, language, isofficial, percentage |
select sum ( population ) , avg ( surfacearea ) from country where continent = 'north america' and surfacearea > 3000
812
world_1
What are the cities whose population is between 160000 and 900000?
| city: population, name, id, countrycode, district | sqlite_sequence: name, seq | country: code, name, continent, region, surfacearea, indepyear, population, lifeexpectancy, gnp, gnpold, localname, governmentform, headofstate, capital, code2 | countrylanguage: countrycode, language, isofficial, percentage | city.countrycode=country.code | countrylanguage.countrycode=country.code |
select name from city where population between 160000 and 900000
813
world_1
Return the names of cities that have a population between 160000 and 900000 .
| city: name, population, id, countrycode, district | sqlite_sequence: name, seq | country: code, name, continent, region, surfacearea, indepyear, population, lifeexpectancy, gnp, gnpold, localname, governmentform, headofstate, capital, code2 | countrylanguage: countrycode, language, isofficial, percentage | city.countrycode = country.code | countrylanguage.countrycode = country.code |
select name from city where population between 160000 and 900000
814
world_1
Which language is spoken by the largest number of countries?
| countrylanguage: language, countrycode | country: code | city: countrycode | sqlite_sequence: name, seq |
select language from countrylanguage group by language order by count ( * ) desc limit 1
815
world_1
Give the language that is spoken in the most countries.
| countrylanguage: language, countrycode | country: code, name | city: id, name, countrycode, district, population | sqlite_sequence: name, seq |
select language from countrylanguage group by language order by count ( * ) desc limit 1
816
world_1
What is the language spoken by the largest percentage of people in each country?
| countrylanguage: language, percentage, countrycode, isofficial | country: name, code, continent, region, surfacearea, indepyear, population, lifeexpectancy, gnp, gnpold, localname, governmentform, headofstate, capital, code2 | city: countrycode, id, name, district, population | sqlite_sequence: name, seq | countrylanguage.countrycode = country.code | city.countrycode = country.code |
select language , countrycode , max ( percentage ) from countrylanguage group by countrycode
817
world_1
What are the country codes of the different countries, and what are the languages spoken by the greatest percentage of people for each?
| country: code, name | countrylanguage: countrycode, language, percentage | city: countrycode |
select language , countrycode , max ( percentage ) from countrylanguage group by countrycode
818
world_1
What is the total number of countries where Spanish is spoken by the largest percentage of people?
| countrylanguage: language, countrycode, percentage, isofficial | country: name, code | city: id, name, countrycode, district, population | sqlite_sequence: name, seq |
select count ( * ) , max ( percentage ) from countrylanguage where language = 'Spanish' group by countrycode
819
world_1
Count the number of countries for which Spanish is the predominantly spoken language.
| countrylanguage: language, isofficial, countrycode | country: code |
select count ( * ) , max ( percentage ) from countrylanguage where language = 'Spanish' group by countrycode
820
world_1
What are the codes of countries where Spanish is spoken by the largest percentage of people?
| countrylanguage: language, percentage, countrycode | country: code, name |
select countrycode , max ( percentage ) from countrylanguage where language = 'Spanish' group by countrycode
821
world_1
Return the codes of countries for which Spanish is the predominantly spoken language.
| countrylanguage: language, countrycode, isofficial, percentage | country: code, name |
select countrycode , max ( percentage ) from countrylanguage where language = 'Spanish' group by countrycode
822
orchestra
How many conductors are there?
| conductor: conductor_id, name, age, nationality, year_of_work | orchestra: conductor_id, orchestra_id, orchestra, record_company, year_of_founded, major_record_format | performance: performance_id, orchestra_id, type, date, official_ratings_(millions), weekly_rank, share | show: show_id, performance_id, if_first_show, result, attendance | orchestra.conductor_id = conductor.conductor_id | performance.orchestra_id = orchestra.orchestra_id | show.performance_id = performance.performance_id |
select count ( * ) from conductor
823
orchestra
Count the number of conductors.
| conductor: conductor_id, name, age, nationality, year_of_work |
select count ( * ) from conductor
824
orchestra
List the names of conductors in ascending order of age.
| conductor: name, age, conductor_id, nationality, year_of_work | orchestra: conductor_id, orchestra_id, orchestra, record_company, year_of_founded, major_record_format | performance: performance_id, orchestra_id, type, date, official_ratings_(millions), weekly_rank, share | show: show_id, performance_id, if_first_show, result, attendance | orchestra.conductor_id = conductor.conductor_id | performance.orchestra_id = orchestra.orchestra_id | show.performance_id = performance.performance_id |
select name from conductor order by age asc
825
orchestra
What are the names of conductors, ordered by age?
| conductor: age, name, conductor_id, nationality, year_of_work | orchestra: conductor_id, orchestra_id, orchestra, record_company, year_of_founded, major_record_format | performance: orchestra_id, performance_id, type, date, official_ratings_(millions), weekly_rank, share | show: performance_id, show_id, if_first_show, result, attendance | orchestra.conductor_id = conductor.conductor_id | performance.orchestra_id = orchestra.orchestra_id | show.performance_id = performance.performance_id |
select name from conductor order by age asc
826
orchestra
What are the names of conductors whose nationalities are not "USA"?
| conductor: nationality, name, conductor_id, age, year_of_work | orchestra: conductor_id, orchestra_id, orchestra, record_company, year_of_founded, major_record_format | performance: performance_id, orchestra_id, type, date, official_ratings_(millions), weekly_rank, share | show: show_id, performance_id, if_first_show, result, attendance | orchestra.conductor_id = conductor.conductor_id | performance.orchestra_id = orchestra.orchestra_id | show.performance_id = performance.performance_id |
select name from conductor where nationality != 'USA'
827
orchestra
Return the names of conductors that do not have the nationality "USA".
| conductor: nationality, name, conductor_id, age, year_of_work | orchestra: conductor_id, orchestra_id, orchestra, record_company, year_of_founded, major_record_format | performance: orchestra_id, performance_id, type, date, official_ratings_(millions), weekly_rank, share | show: performance_id, show_id, if_first_show, result, attendance |
select name from conductor where nationality != 'USA'
828
orchestra
What are the record companies of orchestras in descending order of years in which they were founded?
| orchestra: record_company, year_of_founded, orchestra, orchestra_id, conductor_id, major_record_format | conductor: conductor_id, name, age, nationality, year_of_work | performance: performance_id, orchestra_id, type, date, official_ratings_(millions), weekly_rank, share | show: show_id, performance_id, if_first_show, result, attendance | orchestra.conductor_id = conductor.conductor_id | performance.orchestra_id = orchestra.orchestra_id | show.performance_id = performance.performance_id |
select record_company from orchestra order by year_of_founded desc
829
orchestra
Return the record companies of orchestras, sorted descending by the years in which they were founded.
| orchestra: record_company, year_of_founded, orchestra_id, orchestra, conductor_id, major_record_format | conductor: conductor_id, name, age, nationality, year_of_work | performance: performance_id, orchestra_id, type, date, official_ratings_(millions), weekly_rank, share | show: show_id, performance_id, if_first_show, result, attendance | orchestra.conductor_id = conductor.conductor_id | performance.orchestra_id = orchestra.orchestra_id | show.performance_id = performance.performance_id |
select record_company from orchestra order by year_of_founded desc
830
orchestra
What is the average attendance of shows?
| show: attendance, performance_id | performance: performance_id | conductor: | orchestra: | show.performance_id = performance.performance_id |
select avg ( attendance ) from show
831
orchestra
Return the average attendance across all shows.
| show: show_id, performance_id, if_first_show, result, attendance | performance: performance_id, orchestra_id, type, date, official_ratings_(millions), weekly_rank, share | orchestra: orchestra_id, orchestra, conductor_id, record_company, year_of_founded, major_record_format | conductor: conductor_id, name, age, nationality, year_of_work |
select avg ( attendance ) from show
832
orchestra
What are the maximum and minimum share of performances whose type is not "Live final".
| performance: type, share, performance_id, orchestra_id | orchestra: orchestra_id | conductor: conductor_id | show: performance_id | performance.orchestra_id = orchestra.orchestra_id |
select max ( share ) , min ( share ) from performance where type != 'Live final'
833
orchestra
Return the maximum and minimum shares for performances that do not have the type "Live final".
| performance: type, share | show: | orchestra: | conductor: | performance.orchestra_id = orchestra.orchestra_id | show.performance_id = performance.performance_id | orchestra.conductor_id = conductor.conductor_id |
select max ( share ) , min ( share ) from performance where type != 'Live final'
834
orchestra
How many different nationalities do conductors have?
| conductor: nationality, conductor_id, name, age, year_of_work | orchestra: conductor_id, orchestra_id, orchestra, record_company, year_of_founded, major_record_format | performance: orchestra_id, performance_id, type, date, official_ratings_(millions), weekly_rank, share | show: performance_id, show_id, if_first_show, result, attendance |
select count ( distinct nationality ) from conductor
835
orchestra
Count the number of different nationalities of conductors.
| conductor: nationality, conductor_id, name, age, year_of_work | orchestra: conductor_id, orchestra_id, orchestra, record_company, year_of_founded, major_record_format | performance: performance_id, orchestra_id, type, date, official_ratings_(millions), weekly_rank, share | show: show_id, performance_id, if_first_show, result, attendance |
select count ( distinct nationality ) from conductor
836
orchestra
List names of conductors in descending order of years of work.
| conductor: name, year_of_work, conductor_id, age, nationality | orchestra: conductor_id | performance: | show: | orchestra.conductor_id = conductor.conductor_id | performance.orchestra_id = orchestra.orchestra_id | show.performance_id = performance.performance_id |
select name from conductor order by year_of_work desc
837
orchestra
What are the names of conductors, sorted descending by the number of years they have worked?
| conductor: name, year_of_work, conductor_id, age, nationality | orchestra: conductor_id, orchestra_id, orchestra, record_company, year_of_founded, major_record_format | performance: orchestra_id, performance_id, type, date, official_ratings_(millions), weekly_rank, share | show: performance_id, show_id, if_first_show, result, attendance | orchestra.conductor_id = conductor.conductor_id | performance.orchestra_id = orchestra.orchestra_id | show.performance_id = performance.performance_id |
select name from conductor order by year_of_work desc
838
orchestra
List the name of the conductor with the most years of work.
| conductor: year_of_work, name, conductor_id, age, nationality | orchestra: conductor_id, orchestra_id, orchestra, record_company, year_of_founded, major_record_format | performance: performance_id, orchestra_id, type, date, official_ratings_(millions), weekly_rank, share | show: show_id, performance_id, if_first_show, result, attendance | orchestra.conductor_id = conductor.conductor_id | performance.orchestra_id = orchestra.orchestra_id | show.performance_id = performance.performance_id |
select name from conductor order by year_of_work desc limit 1
839
orchestra
What is the name of the conductor who has worked the greatest number of years?
| Conductor: conductor_id, name, year_of_work, age, nationality | Orchestra: conductor_id, orchestra_id, orchestra, record_company, year_of_founded, major_record_format | Performance: performance_id, orchestra_id, type, date, official_ratings_(millions), weekly_rank, share | Show: show_id, performance_id, if_first_show, result, attendance | orchestra.conductor_id = conductor.conductor_id | performance.orchestra_id = orchestra.orchestra_id | show.performance_id = performance.performance_id |
select name from conductor order by year_of_work desc limit 1
840
orchestra
Show the names of conductors and the orchestras they have conducted.
| conductor: name, conductor_id, age, nationality, year_of_work | orchestra: orchestra, conductor_id, orchestra_id, record_company, year_of_founded, major_record_format | performance: performance_id, orchestra_id, type, date, official_ratings_(millions), weekly_rank, share | show: show_id, performance_id, if_first_show, result, attendance | orchestra.conductor_id = conductor.conductor_id | performance.orchestra_id = orchestra.orchestra_id | show.performance_id = performance.performance_id |
select conductor.name , orchestra.orchestra from conductor join orchestra on conductor.conductor_id = orchestra.conductor_id
841
orchestra
What are the names of conductors as well as the corresonding orchestras that they have conducted?
| conductor: name, conductor_id, age, nationality, year_of_work | orchestra: orchestra, conductor_id, orchestra_id, record_company, year_of_founded, major_record_format | performance: orchestra_id, performance_id, type, date, official_ratings_(millions), weekly_rank, share | show: show_id, performance_id, if_first_show, result, attendance | orchestra.conductor_id = conductor.conductor_id | performance.orchestra_id = orchestra.orchestra_id | show.performance_id = performance.performance_id |
select conductor.name , orchestra.orchestra from conductor join orchestra on conductor.conductor_id = orchestra.conductor_id
842
orchestra
Show the names of conductors that have conducted more than one orchestras.
| conductor: name, conductor_id, age, nationality, year_of_work | orchestra: conductor_id, orchestra_id, orchestra, record_company, year_of_founded, major_record_format | performance: performance_id, orchestra_id, type, date, official_ratings_(millions), weekly_rank, share | show: show_id, performance_id, if_first_show, result, attendance |
select conductor.name from conductor join orchestra on conductor.conductor_id = orchestra.conductor_id group by orchestra.conductor_id having count ( * ) > 1
843
orchestra
What are the names of conductors who have conducted at more than one orchestra?
| conductor: name, conductor_id | orchestra: conductor_id, orchestra_id, orchestra | performance: | show: |
select conductor.name from conductor join orchestra on conductor.conductor_id = orchestra.conductor_id group by orchestra.conductor_id having count ( * ) > 1
844
orchestra
Show the name of the conductor that has conducted the most number of orchestras.
| conductor: conductor_id, name, age, nationality, year_of_work | orchestra: conductor_id, orchestra_id, orchestra, record_company, year_of_founded, major_record_format | performance: orchestra_id, performance_id, type, date, official_ratings_(millions), weekly_rank, share | show: performance_id, show_id, if_first_show, result, attendance |
select conductor.name from conductor join orchestra on conductor.conductor_id = orchestra.conductor_id group by orchestra.conductor_id order by count ( * ) desc limit 1
845
orchestra
What is the name of the conductor who has conducted the most orchestras?
| conductor: name, conductor_id, age, nationality, year_of_work | orchestra: conductor_id, orchestra_id, orchestra, record_company, year_of_founded, major_record_format | performance: orchestra_id, performance_id, type, date, official_ratings_(millions), weekly_rank, share | show: performance_id, show_id, if_first_show, result, attendance | orchestra.conductor_id = conductor.conductor_id | performance.orchestra_id = orchestra.orchestra_id | show.performance_id = performance.performance_id |
select conductor.name from conductor join orchestra on conductor.conductor_id = orchestra.conductor_id group by orchestra.conductor_id order by count ( * ) desc limit 1
846
orchestra
Please show the name of the conductor that has conducted orchestras founded after 2008.
| orchestra: year_of_founded, conductor_id, orchestra_id | conductor: name, conductor_id | performance: orchestra_id | show: performance_id | orchestra.conductor_id = conductor.conductor_id | performance.orchestra_id = orchestra.orchestra_id | show.performance_id = performance.performance_id |
select conductor.name from conductor join orchestra on conductor.conductor_id = orchestra.conductor_id where year_of_founded > 2008
847
orchestra
What are the names of conductors who have conducted orchestras founded after the year 2008?
| conductor: name, conductor_id, year_of_work, age, nationality | orchestra: year_of_founded, conductor_id, orchestra_id, orchestra, record_company, major_record_format | performance: orchestra_id, performance_id, type, date, official_ratings_(millions), weekly_rank, share | show: performance_id, show_id, if_first_show, result, attendance | orchestra.conductor_id = conductor.conductor_id | performance.orchestra_id = orchestra.orchestra_id | show.performance_id = performance.performance_id |
select conductor.name from conductor join orchestra on conductor.conductor_id = orchestra.conductor_id where year_of_founded > 2008
848
orchestra
Please show the different record companies and the corresponding number of orchestras.
| orchestra: record_company, orchestra, orchestra_id | conductor: conductor_id | performance: orchestra_id | show: performance_id | orchestra.conductor_id = conductor.conductor_id | performance.orchestra_id = orchestra.orchestra_id | show.performance_id = performance.performance_id |
select record_company , count ( * ) from orchestra group by record_company
849
orchestra
How many orchestras does each record company manage?
| orchestra: record_company, orchestra_id, orchestra, conductor_id, year_of_founded, major_record_format | conductor: conductor_id, name, age, nationality, year_of_work | performance: performance_id, orchestra_id, type, date, official_ratings_(millions), weekly_rank, share | show: show_id, performance_id, if_first_show, result, attendance | orchestra.conductor_id = conductor.conductor_id | performance.orchestra_id = orchestra.orchestra_id | show.performance_id = performance.performance_id |
select record_company , count ( * ) from orchestra group by record_company
850
orchestra
Please show the record formats of orchestras in ascending order of count.
| orchestra: orchestra_id, major_record_format, record_company, conductor_id, orchestra, year_of_founded | conductor: conductor_id, name, age, nationality, year_of_work | performance: orchestra_id, performance_id, type, date, official_ratings_(millions), weekly_rank, share | show: performance_id, show_id, if_first_show, result, attendance | orchestra.conductor_id = conductor.conductor_id | performance.orchestra_id = orchestra.orchestra_id | show.performance_id = performance.performance_id |
select major_record_format from orchestra group by major_record_format order by count ( * ) asc
851
orchestra
What are the major record formats of orchestras, sorted by their frequency?
| orchestra: major_record_format, orchestra_id | conductor: conductor_id | performance: performance_id, orchestra_id | show: performance_id |
select major_record_format from orchestra group by major_record_format order by count ( * ) asc
852
orchestra
List the record company shared by the most number of orchestras.
| orchestra: record_company, orchestra_id | performance: orchestra_id, performance_id | show: performance_id, show_id | performance.orchestra_id = orchestra.orchestra_id | show.performance_id = performance.performance_id |
select record_company from orchestra group by record_company order by count ( * ) desc limit 1
853
orchestra
What is the record company used by the greatest number of orchestras?
| orchestra: record_company, orchestra_id, conductor_id, orchestra, year_of_founded, major_record_format | conductor: conductor_id, name, age, nationality, year_of_work | performance: orchestra_id, performance_id, type, date, official_ratings_(millions), weekly_rank, share | show: performance_id, show_id, if_first_show, result, attendance | orchestra.conductor_id = conductor.conductor_id | performance.orchestra_id = orchestra.orchestra_id | show.performance_id = performance.performance_id |
select record_company from orchestra group by record_company order by count ( * ) desc limit 1
854
orchestra
List the names of orchestras that have no performance.
| orchestra: orchestra, orchestra_id, conductor_id, record_company, year_of_founded, major_record_format | performance: orchestra_id, performance_id, type, date, official_ratings_(millions), weekly_rank, share | conductor: conductor_id, name, age, nationality, year_of_work | show: show_id, performance_id, if_first_show, result, attendance | performance.orchestra_id = orchestra.orchestra_id | show.performance_id = performance.performance_id | orchestra.conductor_id = conductor.conductor_id |
select orchestra from orchestra where orchestra_id not in ( select orchestra_id from performance )
855
orchestra
What are the orchestras that do not have any performances?
| orchestra: orchestra_id, orchestra, conductor_id, record_company, year_of_founded, major_record_format | performance: performance_id, orchestra_id, type, date, official_ratings_(millions), weekly_rank, share | conductor: conductor_id, name, age, nationality, year_of_work | show: performance_id, show_id, if_first_show, result, attendance | orchestra.conductor_id = conductor.conductor_id | performance.orchestra_id = orchestra.orchestra_id | show.performance_id = performance.performance_id |
select orchestra from orchestra where orchestra_id not in ( select orchestra_id from performance )
856
orchestra
Show the record companies shared by orchestras founded before 2003 and after 2003.
| orchestra: record_company, year_of_founded, orchestra_id, orchestra, conductor_id, major_record_format | conductor: conductor_id, name, age, nationality, year_of_work | performance: performance_id, orchestra_id, type, date, official_ratings_(millions), weekly_rank, share | show: show_id, performance_id, if_first_show, result, attendance | orchestra.conductor_id=conductor.conductor_id | performance.orchestra_id=orchestra.orchestra_id | show.performance_id=performance.performance_id |
select record_company from orchestra where year_of_founded < 2003 intersect select record_company from orchestra where year_of_founded > 2003
857
orchestra
What are the record companies that are used by both orchestras founded before 2003 and those founded after 2003?
| orchestra: year_of_founded, record_company, orchestra_id, orchestra, conductor_id, major_record_format | conductor: conductor_id, name, age, nationality, year_of_work | performance: orchestra_id, performance_id, type, date, official_ratings_(millions), weekly_rank, share | show: show_id, performance_id, if_first_show, result, attendance | orchestra.conductor_id = conductor.conductor_id | performance.orchestra_id = orchestra.orchestra_id | show.performance_id = performance.performance_id |
select record_company from orchestra where year_of_founded < 2003 intersect select record_company from orchestra where year_of_founded > 2003
858
orchestra
Find the number of orchestras whose record format is "CD" or "DVD".
| orchestra: major_record_format, orchestra_id, orchestra, conductor_id, record_company, year_of_founded | conductor: conductor_id, name, age, nationality, year_of_work | performance: orchestra_id, performance_id, type, date, official_ratings_(millions), weekly_rank, share | show: performance_id, show_id, if_first_show, result, attendance |
select count ( * ) from orchestra where major_record_format = 'CD' or major_record_format = 'DVD'
859
orchestra
Count the number of orchestras that have CD or DVD as their record format.
| orchestra: major_record_format, orchestra_id, orchestra, conductor_id, record_company, year_of_founded | conductor: conductor_id, name, age, nationality, year_of_work | performance: performance_id, orchestra_id, type, date, official_ratings_(millions), weekly_rank, share | show: show_id, performance_id, if_first_show, result, attendance | orchestra.conductor_id = conductor.conductor_id | performance.orchestra_id = orchestra.orchestra_id | show.performance_id = performance.performance_id |
select count ( * ) from orchestra where major_record_format = 'CD' or major_record_format = 'DVD'
860
orchestra
Show the years in which orchestras that have given more than one performance are founded.
| conductor: conductor_id, name, age, nationality, year_of_work | orchestra: year_of_founded, orchestra_id, conductor_id, record_company, major_record_format | performance: orchestra_id, performance_id | show: show_id, performance_id, if_first_show, result, attendance | orchestra.conductor_id=conductor.conductor_id | performance.orchestra_id=orchestra.orchestra_id | show.performance_id=performance.performance_id |
select year_of_founded from orchestra join performance on orchestra.orchestra_id = performance.orchestra_id group by performance.orchestra_id having count ( * ) > 1
861
orchestra
What are years of founding for orchestras that have had more than a single performance?
| orchestra: year_of_founded, orchestra_id, conductor_id, orchestra, record_company, major_record_format | performance: orchestra_id, performance_id, type, date, official_ratings_(millions), weekly_rank, share | conductor: conductor_id, name, age, nationality, year_of_work | show: show_id, performance_id, if_first_show, result, attendance | orchestra.conductor_id = conductor.conductor_id | performance.orchestra_id = orchestra.orchestra_id | show.performance_id = performance.performance_id |
select year_of_founded from orchestra join performance on orchestra.orchestra_id = performance.orchestra_id group by performance.orchestra_id having count ( * ) > 1
862
network_1
How many high schoolers are there?
| highschooler: id, name, grade | friend: student_id, friend_id | likes: student_id, liked_id | friend.friend_id = highschooler.id | friend.student_id = highschooler.id | likes.student_id = highschooler.id | likes.liked_id = highschooler.id |
select count ( * ) from highschooler
863
network_1
Count the number of high schoolers.
| highschooler: id, grade, name | friend: student_id, friend_id | likes: student_id, liked_id |
select count ( * ) from highschooler
864
network_1
Show the names and grades of each high schooler.
| highschooler: name, grade, id | friend: | likes: |
select name , grade from highschooler
865
network_1
What are the names and grades for each high schooler?
| highschooler: name, grade, id | friend: student_id, friend_id | likes: student_id, liked_id | friend.friend_id = highschooler.id | friend.student_id = highschooler.id | likes.student_id = highschooler.id | likes.liked_id = highschooler.id |
select name , grade from highschooler
866
network_1
Show all the grades of the high schoolers.
| highschooler: grade, id, name | friend: student_id, friend_id | likes: student_id, liked_id | friend.friend_id = highschooler.id | friend.student_id = highschooler.id | likes.student_id = highschooler.id | likes.liked_id = highschooler.id |
select grade from highschooler
867
network_1
What is the grade of each high schooler?
| highschooler: grade, id, name | friend: student_id, friend_id | likes: student_id, liked_id | friend.friend_id = highschooler.id | friend.student_id = highschooler.id | likes.student_id = highschooler.id | likes.liked_id = highschooler.id |
select grade from highschooler
868
network_1
What grade is Kyle in?
| highschooler: name, grade, id | friend: student_id, friend_id | likes: student_id, liked_id |
select grade from highschooler where name = 'Kyle'
869
network_1
Return the grade for the high schooler named Kyle.
| highschooler: name, grade, id | friend: friend_id, student_id | likes: student_id, liked_id |
select grade from highschooler where name = 'Kyle'
870
network_1
Show the names of all high schoolers in grade 10.
| highschooler: grade, name, id | friend: friend_id, student_id | likes: student_id, liked_id |
select name from highschooler where grade = 10
871
network_1
What are the names of all high schoolers in grade 10?
| highschooler: name, grade, id | friend: student_id, friend_id | likes: student_id, liked_id | friend.friend_id = highschooler.id | friend.student_id = highschooler.id | likes.student_id = highschooler.id | likes.liked_id = highschooler.id |
select name from highschooler where grade = 10
872
network_1
Show the ID of the high schooler named Kyle.
| highschooler: id, name, grade | friend: student_id, friend_id | likes: student_id, liked_id | friend.friend_id = highschooler.id | friend.student_id = highschooler.id | likes.student_id = highschooler.id | likes.liked_id = highschooler.id |
select id from highschooler where name = 'Kyle'
873
network_1
What is Kyle's id?
| highschooler: name, id, grade | friend: student_id, friend_id | likes: student_id, liked_id | friend.friend_id = highschooler.id | friend.student_id = highschooler.id | likes.student_id = highschooler.id | likes.liked_id = highschooler.id |
select id from highschooler where name = 'Kyle'
874
network_1
How many high schoolers are there in grade 9 or 10?
| highschooler: grade, id, name | friend: student_id, friend_id | likes: student_id, liked_id | friend.friend_id = highschooler.id | friend.student_id = highschooler.id | likes.student_id = highschooler.id | likes.liked_id = highschooler.id |
select count ( * ) from highschooler where grade = 9 or grade = 10
875
network_1
Count the number of high schoolers in grades 9 or 10.
| highschooler: grade, id, name | friend: no relevant columns | likes: no relevant columns |
select count ( * ) from highschooler where grade = 9 or grade = 10
876
network_1
Show the number of high schoolers for each grade.
| highschooler: grade, id, name | friend: student_id, friend_id | likes: student_id, liked_id | friend.friend_id = highschooler.id | friend.student_id = highschooler.id | likes.student_id = highschooler.id | likes.liked_id = highschooler.id |
select grade , count ( * ) from highschooler group by grade
877
network_1
How many high schoolers are in each grade?
| highschooler: grade, id, name | friend: student_id, friend_id | likes: student_id, liked_id |
select grade , count ( * ) from highschooler group by grade
878
network_1
Which grade has the most high schoolers?
| highschooler: grade, id, name | friend: friend_id, student_id | likes: liked_id, student_id |
select grade from highschooler group by grade order by count ( * ) desc limit 1
879
network_1
Return the grade that has the greatest number of high schoolers.
| highschooler: grade, id, name | friend: | likes: |
select grade from highschooler group by grade order by count ( * ) desc limit 1
880
network_1
Show me all grades that have at least 4 students.
| highschooler: grade, id, name | friend: student_id, friend_id | likes: - | friend.friend_id = highschooler.id | friend.student_id = highschooler.id | likes.student_id = highschooler.id | likes.liked_id = highschooler.id |
select grade from highschooler group by grade having count ( * ) >= 4
881
network_1
Which grades have 4 or more high schoolers?
| highschooler: grade, id, name | friend: friend_id, student_id | likes: student_id, liked_id | friend.friend_id = highschooler.id | friend.student_id = highschooler.id | likes.student_id = highschooler.id | likes.liked_id = highschooler.id |
select grade from highschooler group by grade having count ( * ) >= 4
882
network_1
Show the student IDs and numbers of friends corresponding to each.
| highschooler: id | friend: student_id, friend_id |
select student_id , count ( * ) from friend group by student_id
883
network_1
How many friends does each student have?
| highschooler: id, name, grade | friend: student_id, friend_id | likes: student_id, liked_id | friend.friend_id = highschooler.id | friend.student_id = highschooler.id | likes.student_id = highschooler.id | likes.liked_id = highschooler.id |
select student_id , count ( * ) from friend group by student_id
884
network_1
Show the names of high school students and their corresponding number of friends.
| highschooler: id, name, grade | friend: student_id, friend_id | likes: student_id, liked_id |
select highschooler.name , count ( * ) from friend join highschooler on friend.student_id = highschooler.id group by friend.student_id
885
network_1
What are the names of the high schoolers and how many friends does each have?
| highschooler: id, name, grade | friend: student_id, friend_id | likes: student_id, liked_id | friend.friend_id = highschooler.id | friend.student_id = highschooler.id |
select highschooler.name , count ( * ) from friend join highschooler on friend.student_id = highschooler.id group by friend.student_id
886
network_1
What is the name of the high schooler who has the greatest number of friends?
| highschooler: id, name, grade | friend: friend_id, student_id | likes: student_id, liked_id | friend.friend_id = highschooler.id | friend.student_id = highschooler.id | likes.student_id = highschooler.id | likes.liked_id = highschooler.id |
select highschooler.name from friend join highschooler on friend.student_id = highschooler.id group by friend.student_id order by count ( * ) desc limit 1
887
network_1
Return the name of the high school student with the most friends.
| highschooler: id, name, grade | friend: student_id, friend_id | likes: student_id, liked_id | friend.friend_id = highschooler.id | friend.student_id = highschooler.id | likes.student_id = highschooler.id | likes.liked_id = highschooler.id |
select highschooler.name from friend join highschooler on friend.student_id = highschooler.id group by friend.student_id order by count ( * ) desc limit 1
888
network_1
Show the names of high schoolers who have at least 3 friends.
| highschooler: name, id, grade | friend: student_id, friend_id | likes: student_id, liked_id | friend.friend_id = highschooler.id | friend.student_id = highschooler.id | likes.student_id = highschooler.id | likes.liked_id = highschooler.id |
select highschooler.name from friend join highschooler on friend.student_id = highschooler.id group by friend.student_id having count ( * ) >= 3
889
network_1
What are the names of high schoolers who have 3 or more friends?
| highschooler: id, name, grade | friend: student_id, friend_id | likes: student_id, liked_id | friend.friend_id = highschooler.id | friend.student_id = highschooler.id | likes.student_id = highschooler.id | likes.liked_id = highschooler.id |
select highschooler.name from friend join highschooler on friend.student_id = highschooler.id group by friend.student_id having count ( * ) >= 3
890
network_1
Show the names of all of the high schooler Kyle's friends.
| highschooler: name, id, grade | friend: student_id, friend_id | likes: student_id, liked_id | friend.friend_id=highschooler.id | friend.student_id=highschooler.id | likes.student_id=highschooler.id | likes.liked_id=highschooler.id |
select highschooler.name from friend join highschooler on friend.student_id = highschooler.id join highschooler on friend.friend_id = highschooler.id where highschooler.name = 'Kyle'
891
network_1
Return the names of friends of the high school student Kyle.
| highschooler: name, id, grade | friend: student_id, friend_id |
select highschooler.name from friend join highschooler on friend.student_id = highschooler.id join highschooler on friend.friend_id = highschooler.id where highschooler.name = 'Kyle'
892
network_1
How many friends does the high school student Kyle have?
| highschooler: name, id, grade | friend: friend_id, student_id | likes: - |
select count ( * ) from friend join highschooler on friend.student_id = highschooler.id where highschooler.name = 'Kyle'
893
network_1
Count the number of friends Kyle has.
| highschooler: name, id, grade | friend: friend_id, student_id |
select count ( * ) from friend join highschooler on friend.student_id = highschooler.id where highschooler.name = 'Kyle'
894
network_1
Show ids of all students who do not have any friends.
| highschooler: id, name, grade | friend: student_id, friend_id | likes: student_id, liked_id | friend.friend_id = highschooler.id | friend.student_id = highschooler.id | likes.student_id = highschooler.id | likes.liked_id = highschooler.id |
select id from highschooler except select student_id from friend
895
network_1
What are the ids of high school students who do not have friends?
| highschooler: id, name, grade | friend: student_id, friend_id | likes: student_id, liked_id | friend.friend_id = highschooler.id | friend.student_id = highschooler.id | likes.student_id = highschooler.id | likes.liked_id = highschooler.id |
select id from highschooler except select student_id from friend
896
network_1
Show names of all high school students who do not have any friends.
| highschooler : id, name, grade | friend : student_id, friend_id |
select name from highschooler except select highschooler.name from friend join highschooler on friend.student_id = highschooler.id
897
network_1
What are the names of students who have no friends?
| highschooler: id, name, grade | friend: student_id, friend_id | likes: student_id, liked_id | friend.friend_id = highschooler.id | friend.student_id = highschooler.id | likes.student_id = highschooler.id | likes.liked_id = highschooler.id |
select name from highschooler except select highschooler.name from friend join highschooler on friend.student_id = highschooler.id
898
network_1
Show the ids of high schoolers who have friends and are also liked by someone else.
| highschooler: id | friend: friend_id, student_id | likes: liked_id, student_id |
select student_id from friend intersect select liked_id from likes
899
network_1
What are the ids of students who both have friends and are liked?
| highschooler: id, name, grade | friend: student_id, friend_id | likes: student_id, liked_id | friend.friend_id = highschooler.id | friend.student_id = highschooler.id | likes.student_id = highschooler.id | likes.liked_id = highschooler.id |
select student_id from friend intersect select liked_id from likes