db_id
stringclasses 40
values | query
stringlengths 22
608
| question
stringlengths 22
185
|
|---|---|---|
cre_Doc_and_collections
|
SELECT T2.Collection_Subset_ID , T1.Collection_Subset_Name , count(*) FROM Collection_Subsets AS T1 JOIN Collection_Subset_Members AS T2 ON T1.Collection_Subset_ID = T2.Collection_Subset_ID GROUP BY T2.Collection_Subset_ID;
|
What are the collection subset ids, names, and number of collections for each subset?
|
cre_Doc_and_collections
|
SELECT T2.Document_Object_ID , count(*) FROM Document_Objects AS T1 JOIN Document_Objects AS T2 ON T1.Parent_Document_Object_ID = T2.Document_Object_ID GROUP BY T2.Document_Object_ID ORDER BY count(*) DESC LIMIT 1;
|
Which document has most of child? List the document id and the number of child.
|
cre_Doc_and_collections
|
SELECT T2.Document_Object_ID , count(*) FROM Document_Objects AS T1 JOIN Document_Objects AS T2 ON T1.Parent_Document_Object_ID = T2.Document_Object_ID GROUP BY T2.Document_Object_ID ORDER BY count(*) DESC LIMIT 1;
|
For each document object id, how many children do they have?
|
cre_Doc_and_collections
|
SELECT Document_Object_ID , count(*) FROM Document_Subset_Members GROUP BY Document_Object_ID ORDER BY count(*) ASC LIMIT 1;
|
Which document has least number of related documents? List the document id and the number of related documents.
|
cre_Doc_and_collections
|
select document_object_id , count(*) from document_subset_members group by document_object_id order by count(*) asc limit 1;
|
What is the document object id with the least number of documents ?
|
cre_Doc_and_collections
|
select document_object_id , count(*) from document_subset_members group by document_object_id having count(*) between 2 and 4;
|
Which document has between 2 and 4 number of documents ? List the document id and the number of related documents .
|
cre_Doc_and_collections
|
SELECT Document_Object_ID , count(*) FROM Document_Subset_Members GROUP BY Document_Object_ID HAVING count(*) BETWEEN 2 AND 4;
|
What are the ids of the dcouments that have between 2 and 4 related documents and how many related items are there?
|
cre_Doc_and_collections
|
SELECT DISTINCT OWNER FROM Document_Subset_Members AS T1 JOIN Document_Objects AS T2 ON T1.Related_Document_Object_ID = T2.Document_Object_ID WHERE T2.Owner = 'Braeden';
|
List all owner of documents that is related to documents owned by Braeden.
|
cre_Doc_and_collections
|
SELECT DISTINCT OWNER FROM Document_Subset_Members AS T1 JOIN Document_Objects AS T2 ON T1.Related_Document_Object_ID = T2.Document_Object_ID WHERE T2.Owner = 'Braeden';
|
What are the different owners of documents that are related to ones owned by Braeden?
|
cre_Doc_and_collections
|
SELECT DISTINCT T1.Document_Subset_Name FROM Document_Subsets AS T1 JOIN Document_Subset_Members AS T2 ON T1.Document_Subset_ID = T2.Document_Subset_ID JOIN Document_Objects AS T3 ON T2.Document_Object_ID = T3.Document_Object_ID WHERE T3.owner = 'Braeden'
|
Which unique subset does document owned by Braeden belong to? List the subset name.
|
cre_Doc_and_collections
|
SELECT DISTINCT T1.Document_Subset_Name FROM Document_Subsets AS T1 JOIN Document_Subset_Members AS T2 ON T1.Document_Subset_ID = T2.Document_Subset_ID JOIN Document_Objects AS T3 ON T2.Document_Object_ID = T3.Document_Object_ID WHERE T3.owner = 'Braeden'
|
What are the different subset names of all documents owned by Braeden?
|
cre_Doc_and_collections
|
SELECT T1.Document_Subset_ID , T2.Document_Subset_Name , count(DISTINCT T1.Document_Object_ID) FROM Document_Subset_Members AS T1 JOIN Document_Subsets AS T2 ON T1.Document_Subset_ID = T2.Document_Subset_ID GROUP BY T1.Document_Subset_ID;
|
List subset id, name and number of different documents in each subset.
|
cre_Doc_and_collections
|
SELECT T1.Document_Subset_ID , T2.Document_Subset_Name , count(DISTINCT T1.Document_Object_ID) FROM Document_Subset_Members AS T1 JOIN Document_Subsets AS T2 ON T1.Document_Subset_ID = T2.Document_Subset_ID GROUP BY T1.Document_Subset_ID;
|
What is the subset id, name, and number of different documents for each subset?
|
cre_Doc_and_collections
|
select t1.document_subset_id , t2.document_subset_name , count(distinct t1.document_object_id) from document_subset_members as t1 join document_subsets as t2 on t1.document_subset_id = t2.document_subset_id group by t1.document_subset_id order by count(*) desc limit 1;
|
Which document subset has most of number of distinct documents ? List subset id , name and number of documents .
|
cre_Doc_and_collections
|
select t1.document_subset_id , t2.document_subset_name , count(distinct t1.document_object_id) from document_subset_members as t1 join document_subsets as t2 on t1.document_subset_id = t2.document_subset_id group by t1.document_subset_id order by count(*) desc limit 1;
|
For the document subset with the most number of different documents , what are the ids and names of the subset , as well as the number of documents ?
|
cre_Doc_and_collections
|
SELECT DISTINCT T1.Document_Object_ID FROM Document_Subset_Members AS T1 JOIN Document_Subsets AS T2 ON T1.Document_Subset_ID = T2.Document_Subset_ID WHERE T2.Document_Subset_Name = "Best for 2000";
|
For document subset named 'Best for 2000', List all document id that in this subset.
|
cre_Doc_and_collections
|
SELECT DISTINCT T1.Document_Object_ID FROM Document_Subset_Members AS T1 JOIN Document_Subsets AS T2 ON T1.Document_Subset_ID = T2.Document_Subset_ID WHERE T2.Document_Subset_Name = "Best for 2000";
|
For the document subset named 'Best for 2000', what are the document ids in that subset?
|
cre_Doc_and_collections
|
SELECT DISTINCT T3.Document_Subset_Name , T1.Document_Object_ID FROM Document_Subset_Members AS T1 JOIN Document_Subset_Members AS T2 ON T1.Related_Document_Object_ID = T2.Document_Object_ID JOIN Document_Subsets AS T3 ON T2.Document_Subset_ID = T3.Document_Subset_ID
|
List all document subsets of documents that related to each document id. List the name of document subset and the document id.
|
cre_Doc_and_collections
|
select distinct t3.document_subset_name , t1.document_object_id from document_subset_members as t1 join document_subset_members as t2 on t1.related_document_object_id = t2.document_object_id join document_subsets as t3 on t2.document_subset_id = t3.document_subset_id
|
What are the different subsets of documents related to each document id , list the name of the document subset and id of the actual document ?
|
cre_Doc_and_collections
|
select t1.collection_name from collections as t1 join documents_in_collections as t2 on t1.collection_id = t2.collection_id join document_objects as t3 on t2.document_object_id = t3.document_object_id where t3.owner = 'ransom'
|
List the Collection Name that document owned by 'Ransom ' belong to .
|
cre_Doc_and_collections
|
SELECT T1.Collection_Name FROM Collections AS T1 JOIN Documents_in_Collections AS T2 ON T1.Collection_ID = T2.Collection_ID JOIN Document_Objects AS T3 ON T2.Document_object_id = T3.Document_object_id WHERE T3.owner = 'Ransom'
|
What is the collection name of a document owned by 'Ransom'?
|
cre_Doc_and_collections
|
SELECT count(*) , T2.Document_Object_ID FROM Collections AS T1 JOIN Documents_in_Collections AS T2 ON T1.Collection_ID = T2.Collection_ID GROUP BY T2.Document_Object_ID
|
How many collections does each document belong to? List the count and the document id.
|
cre_Doc_and_collections
|
SELECT count(*) , T2.Document_Object_ID FROM Collections AS T1 JOIN Documents_in_Collections AS T2 ON T1.Collection_ID = T2.Collection_ID GROUP BY T2.Document_Object_ID
|
For each document object id, how many collections does it belong to?
|
cre_Doc_and_collections
|
SELECT count(*) FROM Collections AS T1 JOIN Documents_in_Collections AS T2 ON T1.Collection_ID = T2.Collection_ID WHERE T1.Collection_Name = "Best";
|
How many documents does collection named 'Best' has?
|
cre_Doc_and_collections
|
SELECT count(*) FROM Collections AS T1 JOIN Documents_in_Collections AS T2 ON T1.Collection_ID = T2.Collection_ID WHERE T1.Collection_Name = "Best";
|
What is the number of documents in the collection named 'Best'?
|
cre_Doc_and_collections
|
SELECT T2.Document_Object_ID FROM Collections AS T1 JOIN Documents_in_Collections AS T2 ON T1.Collection_ID = T2.Collection_ID WHERE T1.Collection_Name = "Best";
|
List the document id of all documents in collection named Best.
|
cre_Doc_and_collections
|
SELECT T2.Document_Object_ID FROM Collections AS T1 JOIN Documents_in_Collections AS T2 ON T1.Collection_ID = T2.Collection_ID WHERE T1.Collection_Name = "Best";
|
What is the number of document object ids in the collection named Best?
|
cre_Doc_and_collections
|
SELECT T1.Collection_Name , T1.Collection_ID , count(*) FROM Collections AS T1 JOIN Documents_in_Collections AS T2 ON T1.Collection_ID = T2.Collection_ID WHERE T1.Collection_Name = "Best" GROUP BY T1.Collection_ID ORDER BY count(*) DESC LIMIT 1;
|
Which collection have most number of documents? List collection name, id and number of documents.
|
cre_Doc_and_collections
|
SELECT T1.Collection_Name , T1.Collection_ID , count(*) FROM Collections AS T1 JOIN Documents_in_Collections AS T2 ON T1.Collection_ID = T2.Collection_ID WHERE T1.Collection_Name = "Best" GROUP BY T1.Collection_ID ORDER BY count(*) DESC LIMIT 1;
|
For ever collection named 'Best', what is the name and id of the one with the most documents, and how many documents does it have?
|
cre_Doc_and_collections
|
SELECT DISTINCT T1.Document_Object_ID FROM Document_Subset_Members AS T1 JOIN Document_Subsets AS T2 ON T1.Document_Subset_ID = T2.Document_Subset_ID JOIN Documents_in_Collections AS T3 ON T1.Document_Object_ID = T3.Document_Object_ID JOIN Collections AS T4 ON T3.Collection_ID = T4.Collection_ID WHERE T2.Document_Subset_Name = "Best for 2000" AND T4.Collection_Name = "Best";
|
List id of documents that in document subset Best for 2000 and collection named Best.
|
cre_Doc_and_collections
|
SELECT DISTINCT T1.Document_Object_ID FROM Document_Subset_Members AS T1 JOIN Document_Subsets AS T2 ON T1.Document_Subset_ID = T2.Document_Subset_ID JOIN Documents_in_Collections AS T3 ON T1.Document_Object_ID = T3.Document_Object_ID JOIN Collections AS T4 ON T3.Collection_ID = T4.Collection_ID WHERE T2.Document_Subset_Name = "Best for 2000" AND T4.Collection_Name = "Best";
|
What are the different document object ids in the subset named 'Best for 2000' and in the collection named 'Best'?
|
cre_Doc_and_collections
|
SELECT DISTINCT T2.Document_Object_ID FROM Collections AS T1 JOIN Documents_in_Collections AS T2 ON T1.Collection_ID = T2.Collection_ID WHERE T1.Collection_Name = "Best" EXCEPT SELECT DISTINCT T3.Document_Object_ID FROM Document_Subset_Members AS T3 JOIN Document_Subsets AS T4 ON T3.Document_Subset_ID = T4.Document_Subset_ID WHERE T4.Document_Subset_Name = "Best for 2000"
|
List id of documents that in collection named Best but not in document subset Best for 2000.
|
cre_Doc_and_collections
|
SELECT DISTINCT T2.Document_Object_ID FROM Collections AS T1 JOIN Documents_in_Collections AS T2 ON T1.Collection_ID = T2.Collection_ID WHERE T1.Collection_Name = "Best" EXCEPT SELECT DISTINCT T3.Document_Object_ID FROM Document_Subset_Members AS T3 JOIN Document_Subsets AS T4 ON T3.Document_Subset_ID = T4.Document_Subset_ID WHERE T4.Document_Subset_Name = "Best for 2000"
|
What are the different document object ids that are in the collection named Best but not in the subset named 'Best for 2000'?
|
cre_Doc_and_collections
|
SELECT DISTINCT T1.Document_Object_ID FROM Document_Subset_Members AS T1 JOIN Document_Subsets AS T2 ON T1.Document_Subset_ID = T2.Document_Subset_ID JOIN Documents_in_Collections AS T3 ON T1.Document_Object_ID = T3.Document_Object_ID JOIN Collections AS T4 ON T3.Collection_ID = T4.Collection_ID WHERE T2.Document_Subset_Name = "Best for 2000" OR T4.Collection_Name = "Best";
|
List id of documents that in document subset Best for 2000 or in collection named Best.
|
cre_Doc_and_collections
|
SELECT DISTINCT T1.Document_Object_ID FROM Document_Subset_Members AS T1 JOIN Document_Subsets AS T2 ON T1.Document_Subset_ID = T2.Document_Subset_ID JOIN Documents_in_Collections AS T3 ON T1.Document_Object_ID = T3.Document_Object_ID JOIN Collections AS T4 ON T3.Collection_ID = T4.Collection_ID WHERE T2.Document_Subset_Name = "Best for 2000" OR T4.Collection_Name = "Best";
|
What are the different document ids that are in the subset named 'Best for 2000' or in the collection named 'Best'?
|
cre_Doc_and_collections
|
SELECT DISTINCT T4.Collection_Name FROM Collection_Subset_Members AS T1 JOIN Collection_Subset_Members AS T2 ON T1.Related_Collection_ID = T2.Collection_ID JOIN Collections AS T3 ON T1.Collection_ID = T3.Collection_ID JOIN Collections AS T4 ON T2.Collection_ID = T4.Collection_ID WHERE T3.Collection_Name = "Best";
|
List all name of collections that are related to collection named Best.
|
cre_Doc_and_collections
|
SELECT DISTINCT T4.Collection_Name FROM Collection_Subset_Members AS T1 JOIN Collection_Subset_Members AS T2 ON T1.Related_Collection_ID = T2.Collection_ID JOIN Collections AS T3 ON T1.Collection_ID = T3.Collection_ID JOIN Collections AS T4 ON T2.Collection_ID = T4.Collection_ID WHERE T3.Collection_Name = "Best";
|
What are the names of the collections that are related to the collection named Best?
|
cre_Doc_and_collections
|
SELECT count(DISTINCT T1.Related_Collection_ID) FROM Collection_Subset_Members AS T1 JOIN Collections AS T2 ON T1.Collection_ID = T2.Collection_ID WHERE T2.Collection_Name = "Best";
|
How many collections that are related to collection named Best?
|
cre_Doc_and_collections
|
SELECT count(DISTINCT T1.Related_Collection_ID) FROM Collection_Subset_Members AS T1 JOIN Collections AS T2 ON T1.Collection_ID = T2.Collection_ID WHERE T2.Collection_Name = "Best";
|
How many different collections are related to the one named 'Best'?
|
cre_Doc_and_collections
|
SELECT DISTINCT T1.Collection_Subset_Name FROM Collection_Subsets AS T1 JOIN Collection_Subset_Members AS T2 ON T1.Collection_Subset_ID = T2.Collection_Subset_ID JOIN Collections AS T3 ON T2.Collection_ID = T3.Collection_ID WHERE T3.Collection_Name = "Best";
|
Which collection subset does collection name Best in? List collection subset name.
|
cre_Doc_and_collections
|
SELECT DISTINCT T1.Collection_Subset_Name FROM Collection_Subsets AS T1 JOIN Collection_Subset_Members AS T2 ON T1.Collection_Subset_ID = T2.Collection_Subset_ID JOIN Collections AS T3 ON T2.Collection_ID = T3.Collection_ID WHERE T3.Collection_Name = "Best";
|
What are the collection subsets that the collection named 'Best' in?
|
sing_contest
|
SELECT count(*) FROM songs WHERE name LIKE "%Love%"
|
How many songs contain "Love" in their names?
|
sing_contest
|
SELECT name FROM songs ORDER BY name
|
List the name of the songs in ascending, lexicographical order.
|
sing_contest
|
select name , language from songs
|
List the names and languages of the songs .
|
sing_contest
|
SELECT max(voice_sound_quality) , min(voice_sound_quality) FROM performance_score
|
What are the maximum and minimum voice sound quality score of the performances?
|
sing_contest
|
SELECT T1.voice_sound_quality , T1.rhythm_tempo , T1.stage_presence FROM performance_score AS T1 JOIN participants AS T2 ON T1.participant_id = T2.id WHERE T2.name = 'Freeway'
|
What are the voice sound quality score, rhythm tempo score and stage presence score performed by the participant named 'Freeway'?
|
sing_contest
|
SELECT id , LANGUAGE , original_artist FROM songs WHERE name != 'Love'
|
What are the id, language and original artist of the songs whose name is not 'Love'?
|
sing_contest
|
SELECT name , original_artist FROM songs WHERE english_translation = 'All the streets of love'
|
What are the names and original artists of the song whose English translation is 'All the streets of love'?
|
sing_contest
|
SELECT DISTINCT T2.stage_presence FROM songs AS T1 JOIN performance_score AS T2 ON T1.id = T2.songs_id WHERE T1.language = 'English'
|
What are the distinct stage presence scores for all the songs that are in language 'English' ?
|
sing_contest
|
SELECT T1.id , T1.Name FROM participants AS T1 JOIN performance_score AS T2 ON T2.participant_id = T1.id GROUP BY T1.id HAVING count(*) >= 2
|
What are the ids and names of the participants who have performed at least two songs?
|
sing_contest
|
SELECT T1.id , T1.Name , T1.popularity FROM participants AS T1 JOIN performance_score AS T2 ON T2.participant_id = T1.id GROUP BY T1.id ORDER BY count(*)
|
What are the ids, names and popularity of the participants, order by the number of songs they perform?
|
sing_contest
|
SELECT T1.id , T1.name FROM participants AS T1 JOIN performance_score AS T2 ON T2.participant_id = T1.id WHERE T2.voice_sound_quality = 5 OR T2.rhythm_tempo = 5
|
What are the id and name of the participants who received score 5 for their sound quality or rhythm tempo?
|
sing_contest
|
SELECT T1.voice_sound_quality FROM performance_score AS T1 JOIN songs AS T2 ON T1.songs_id = T2.id WHERE T2.name = ' The Balkan Girls ' AND T2.language = 'English'
|
What are the voice sound quality scores received for the song named ' The Balkan Girls ' in English language ?
|
sing_contest
|
SELECT T1.id , T1.name FROM songs AS T1 JOIN performance_score AS T2 ON T1.id = T2.songs_id GROUP BY T1.id ORDER BY count(*) DESC LIMIT 1
|
What are the id and name of the song sung by the most participants?
|
sing_contest
|
SELECT count(*) FROM performance_score WHERE stage_presence < 7 OR stage_presence > 9
|
How many performances have a stage presence score less than 7 or higher than 9?
|
sing_contest
|
SELECT count(*) FROM songs WHERE id NOT IN ( SELECT songs_id FROM performance_score );
|
How many songs listed are not performed?
|
sing_contest
|
SELECT avg(T2.rhythm_tempo) , T1.language FROM songs AS T1 JOIN performance_score AS T2 ON T2.songs_id = T1.id GROUP BY T1.language
|
What are the average rhythm scores for the songs in each different language?
|
sing_contest
|
SELECT DISTINCT T1.name FROM participants AS T1 JOIN performance_score AS T2 ON T2.participant_id = T1.id JOIN songs AS T3 ON T3.id = T2.songs_id WHERE T3.language = 'English'
|
What are the distinct names of the participants who have sung a song in 'English'?
|
sing_contest
|
SELECT T1.name , T1.popularity FROM participants AS T1 JOIN performance_score AS T2 ON T2.participant_id = T1.id JOIN songs AS T3 ON T3.id = T2.songs_id WHERE T3.language = 'Croatian' INTERSECT SELECT T1.name , T1.popularity FROM participants AS T1 JOIN performance_score AS T2 ON T2.participant_id = T1.id JOIN songs AS T3 ON T3.id = T2.songs_id WHERE T3.language = 'English'
|
What are the name and popularity of participants who have sung a song both in 'Croatian' language and in 'English' language?
|
sing_contest
|
SELECT name FROM songs WHERE name LIKE "%Is%"
|
Which song names have the substring "Is"?
|
sing_contest
|
select t2.original_artist from performance_score as t1 join songs as t2 on t2.id = t1.songs_id where t1.rhythm_tempo > 5 order by t1.voice_sound_quality desc
|
Find the original artists who sing songs with rhythm tempo above 5 , and list results in descending order of voice sound quality .
|
address_1
|
SELECT count(*) FROM City
|
How many cities do we have?
|
address_1
|
SELECT count(*) FROM City
|
Count the number of cities.
|
address_1
|
select distinct state from city
|
List all different states .
|
address_1
|
SELECT DISTINCT state FROM City
|
What are all the distinct states?
|
address_1
|
SELECT count(DISTINCT country) FROM City
|
How many countries do we have?
|
address_1
|
SELECT count(DISTINCT country) FROM City
|
Count the number of coutries.
|
address_1
|
SELECT city_name , city_code , state , country FROM City
|
Show names, codes, states, countries for all cities.
|
address_1
|
SELECT city_name , city_code , state , country FROM City
|
What are the names, codes, states, and countries for all cities?
|
address_1
|
SELECT latitude , longitude FROM City WHERE city_name = "Baltimore"
|
What is the latitude and longitude for Baltimore?
|
address_1
|
SELECT latitude , longitude FROM City WHERE city_name = "Baltimore"
|
What latitude and longitude correspond to Baltimore?
|
address_1
|
SELECT city_name FROM City WHERE state = "PA"
|
Show names for all cities in state PA.
|
address_1
|
SELECT city_name FROM City WHERE state = "PA"
|
What are the names of all cities in PA?
|
address_1
|
SELECT count(*) FROM City WHERE country = "CANADA"
|
How many cities are in Canada?
|
address_1
|
SELECT count(*) FROM City WHERE country = "CANADA"
|
Count the number of cities in Canada.
|
address_1
|
SELECT city_name FROM City WHERE country = "USA" ORDER BY latitude
|
Show names for all USA city ordered by latitude.
|
address_1
|
SELECT city_name FROM City WHERE country = "USA" ORDER BY latitude
|
What are all the city names for cities in the USA, ordered by latitude?
|
address_1
|
SELECT state , count(*) FROM City GROUP BY state
|
Show all states and number of cities in each state.
|
address_1
|
SELECT state , count(*) FROM City GROUP BY state
|
How many cities are in each state?
|
address_1
|
select country , count(*) from city group by country
|
Show all countries and number of cities in each .
|
address_1
|
SELECT country , count(*) FROM City GROUP BY country
|
How many cities are there in each country?
|
address_1
|
SELECT state FROM City GROUP BY state HAVING count(*) >= 2
|
List all states with at least two cities.
|
address_1
|
SELECT state FROM City GROUP BY state HAVING count(*) >= 2
|
Which states have at least two cities?
|
address_1
|
SELECT state FROM City GROUP BY state ORDER BY count(*) DESC LIMIT 1
|
Which state has most number of cities?
|
address_1
|
SELECT state FROM City GROUP BY state ORDER BY count(*) DESC LIMIT 1
|
Give the state that has the most cities.
|
address_1
|
SELECT country FROM City GROUP BY country ORDER BY count(*) ASC LIMIT 1
|
Which country has fewest number of cities?
|
address_1
|
SELECT country FROM City GROUP BY country ORDER BY count(*) ASC LIMIT 1
|
Give the country with the fewest number of cities.
|
address_1
|
SELECT T2.Fname , T2.Lname FROM City AS T1 JOIN Student AS T2 ON T1.city_code = T2.city_code WHERE T1.state = "MD"
|
Show the first name and the last name for students living in state MD.
|
address_1
|
SELECT T2.Fname , T2.Lname FROM City AS T1 JOIN Student AS T2 ON T1.city_code = T2.city_code WHERE T1.state = "MD"
|
What are the full names of students living in MD?
|
address_1
|
SELECT count(*) FROM City AS T1 JOIN Student AS T2 ON T1.city_code = T2.city_code WHERE T1.country = "CHINA"
|
How many students live in China?
|
address_1
|
SELECT count(*) FROM City AS T1 JOIN Student AS T2 ON T1.city_code = T2.city_code WHERE T1.country = "CHINA"
|
Count the number of students living in China.
|
address_1
|
SELECT T2.Fname , T2.Major FROM City AS T1 JOIN Student AS T2 ON T1.city_code = T2.city_code WHERE T1.city_name = "Baltimore"
|
Return the first name and major of students are living in Baltimore?
|
address_1
|
SELECT T2.Fname , T2.Major FROM City AS T1 JOIN Student AS T2 ON T1.city_code = T2.city_code WHERE T1.city_name = "Baltimore"
|
What are the first names and majors of students living in Baltimore?
|
address_1
|
SELECT T1.country , count(*) FROM City AS T1 JOIN Student AS T2 ON T1.city_code = T2.city_code GROUP BY T1.country
|
Show the number of students living in each country.
|
address_1
|
SELECT T1.country , count(*) FROM City AS T1 JOIN Student AS T2 ON T1.city_code = T2.city_code GROUP BY T1.country
|
How many students live in each country?
|
address_1
|
SELECT T1.city_name , count(*) FROM City AS T1 JOIN Student AS T2 ON T1.city_code = T2.city_code GROUP BY T1.city_code
|
Find the number of students living in each city.
|
address_1
|
SELECT T1.city_name , count(*) FROM City AS T1 JOIN Student AS T2 ON T1.city_code = T2.city_code GROUP BY T1.city_code
|
How many students live in each city?
|
address_1
|
SELECT T1.state FROM City AS T1 JOIN Student AS T2 ON T1.city_code = T2.city_code GROUP BY T1.state ORDER BY count(*) DESC LIMIT 1
|
Which state has most number of students?
|
address_1
|
SELECT T1.state FROM City AS T1 JOIN Student AS T2 ON T1.city_code = T2.city_code GROUP BY T1.state ORDER BY count(*) DESC LIMIT 1
|
Give the state that has the most students.
|
address_1
|
SELECT T1.country FROM City AS T1 JOIN Student AS T2 ON T1.city_code = T2.city_code GROUP BY T1.country ORDER BY count(*) LIMIT 1
|
Which country has least number of students?
|
Subsets and Splits
World Countries Non-English Languages
The query filters specific database entries based on a particular query pattern, providing limited insight as it simply retrieves rows that match a specific condition.