nl stringlengths 18 174 | sql stringlengths 20 422 | db_id stringclasses 20
values | table_schema stringclasses 90
values |
|---|---|---|---|
How many singers are there? | SELECT count(*) FROM singer | singer | [{'table_name': 'singer', 'table_schema': [{'col_name': 'singer id'}, {'col_name': 'name'}, {'col_name': 'birth year'}, {'col_name': 'net worth millions'}, {'col_name': 'citizenship'}], 'foreign_key_columns': [], 'primary_keys': ['singer id']}] |
What is the count of singers? | SELECT count(*) FROM singer | singer | [{'table_name': 'singer', 'table_schema': [{'col_name': 'singer id'}, {'col_name': 'name'}, {'col_name': 'birth year'}, {'col_name': 'net worth millions'}, {'col_name': 'citizenship'}], 'foreign_key_columns': [], 'primary_keys': ['singer id']}] |
List the name of singers in ascending order of net worth. | SELECT Name FROM singer ORDER BY Net_Worth_Millions ASC | singer | [{'table_name': 'singer', 'table_schema': [{'col_name': 'singer id'}, {'col_name': 'name'}, {'col_name': 'birth year'}, {'col_name': 'net worth millions'}, {'col_name': 'citizenship'}], 'foreign_key_columns': [], 'primary_keys': ['singer id']}] |
What are the names of singers ordered by ascending net worth? | SELECT Name FROM singer ORDER BY Net_Worth_Millions ASC | singer | [{'table_name': 'singer', 'table_schema': [{'col_name': 'singer id'}, {'col_name': 'name'}, {'col_name': 'birth year'}, {'col_name': 'net worth millions'}, {'col_name': 'citizenship'}], 'foreign_key_columns': [], 'primary_keys': ['singer id']}] |
What are the birth year and citizenship of singers? | SELECT Birth_Year , Citizenship FROM singer | singer | [{'table_name': 'singer', 'table_schema': [{'col_name': 'singer id'}, {'col_name': 'name'}, {'col_name': 'birth year'}, {'col_name': 'net worth millions'}, {'col_name': 'citizenship'}], 'foreign_key_columns': [], 'primary_keys': ['singer id']}] |
What are the birth years and citizenships of the singers? | SELECT Birth_Year , Citizenship FROM singer | singer | [{'table_name': 'singer', 'table_schema': [{'col_name': 'singer id'}, {'col_name': 'name'}, {'col_name': 'birth year'}, {'col_name': 'net worth millions'}, {'col_name': 'citizenship'}], 'foreign_key_columns': [], 'primary_keys': ['singer id']}] |
List the name of singers whose citizenship is not "France". | SELECT Name FROM singer WHERE Citizenship != "France" | singer | [{'table_name': 'singer', 'table_schema': [{'col_name': 'singer id'}, {'col_name': 'name'}, {'col_name': 'birth year'}, {'col_name': 'net worth millions'}, {'col_name': 'citizenship'}], 'foreign_key_columns': [], 'primary_keys': ['singer id']}] |
What are the names of the singers who are not French citizens? | SELECT Name FROM singer WHERE Citizenship != "France" | singer | [{'table_name': 'singer', 'table_schema': [{'col_name': 'singer id'}, {'col_name': 'name'}, {'col_name': 'birth year'}, {'col_name': 'net worth millions'}, {'col_name': 'citizenship'}], 'foreign_key_columns': [], 'primary_keys': ['singer id']}] |
Show the name of singers whose birth year is either 1948 or 1949? | SELECT Name FROM singer WHERE Birth_Year = 1948 OR Birth_Year = 1949 | singer | [{'table_name': 'singer', 'table_schema': [{'col_name': 'singer id'}, {'col_name': 'name'}, {'col_name': 'birth year'}, {'col_name': 'net worth millions'}, {'col_name': 'citizenship'}], 'foreign_key_columns': [], 'primary_keys': ['singer id']}] |
What are the names of the singers whose birth years are either 1948 or 1949? | SELECT Name FROM singer WHERE Birth_Year = 1948 OR Birth_Year = 1949 | singer | [{'table_name': 'singer', 'table_schema': [{'col_name': 'singer id'}, {'col_name': 'name'}, {'col_name': 'birth year'}, {'col_name': 'net worth millions'}, {'col_name': 'citizenship'}], 'foreign_key_columns': [], 'primary_keys': ['singer id']}] |
What is the name of the singer with the largest net worth? | SELECT Name FROM singer ORDER BY Net_Worth_Millions DESC LIMIT 1 | singer | [{'table_name': 'singer', 'table_schema': [{'col_name': 'singer id'}, {'col_name': 'name'}, {'col_name': 'birth year'}, {'col_name': 'net worth millions'}, {'col_name': 'citizenship'}], 'foreign_key_columns': [], 'primary_keys': ['singer id']}] |
What is the name of the singer who is worth the most? | SELECT Name FROM singer ORDER BY Net_Worth_Millions DESC LIMIT 1 | singer | [{'table_name': 'singer', 'table_schema': [{'col_name': 'singer id'}, {'col_name': 'name'}, {'col_name': 'birth year'}, {'col_name': 'net worth millions'}, {'col_name': 'citizenship'}], 'foreign_key_columns': [], 'primary_keys': ['singer id']}] |
Show different citizenship of singers and the number of singers of each citizenship. | SELECT Citizenship , COUNT(*) FROM singer GROUP BY Citizenship | singer | [{'table_name': 'singer', 'table_schema': [{'col_name': 'singer id'}, {'col_name': 'name'}, {'col_name': 'birth year'}, {'col_name': 'net worth millions'}, {'col_name': 'citizenship'}], 'foreign_key_columns': [], 'primary_keys': ['singer id']}] |
For each citizenship, how many singers are from that country? | SELECT Citizenship , COUNT(*) FROM singer GROUP BY Citizenship | singer | [{'table_name': 'singer', 'table_schema': [{'col_name': 'singer id'}, {'col_name': 'name'}, {'col_name': 'birth year'}, {'col_name': 'net worth millions'}, {'col_name': 'citizenship'}], 'foreign_key_columns': [], 'primary_keys': ['singer id']}] |
Please show the most common citizenship of singers. | SELECT Citizenship FROM singer GROUP BY Citizenship ORDER BY COUNT(*) DESC LIMIT 1 | singer | [{'table_name': 'singer', 'table_schema': [{'col_name': 'singer id'}, {'col_name': 'name'}, {'col_name': 'birth year'}, {'col_name': 'net worth millions'}, {'col_name': 'citizenship'}], 'foreign_key_columns': [], 'primary_keys': ['singer id']}] |
What is the most common singer citizenship ? | select citizenship from singer group by citizenship order by count(*) desc limit 1 | singer | [{'table_name': 'singer', 'table_schema': [{'col_name': 'singer id'}, {'col_name': 'name'}, {'col_name': 'birth year'}, {'col_name': 'net worth millions'}, {'col_name': 'citizenship'}], 'foreign_key_columns': [], 'primary_keys': ['singer id']}] |
Show different citizenships and the maximum net worth of singers of each citizenship. | SELECT Citizenship , max(Net_Worth_Millions) FROM singer GROUP BY Citizenship | singer | [{'table_name': 'singer', 'table_schema': [{'col_name': 'singer id'}, {'col_name': 'name'}, {'col_name': 'birth year'}, {'col_name': 'net worth millions'}, {'col_name': 'citizenship'}], 'foreign_key_columns': [], 'primary_keys': ['singer id']}] |
For each citizenship, what is the maximum net worth? | SELECT Citizenship , max(Net_Worth_Millions) FROM singer GROUP BY Citizenship | singer | [{'table_name': 'singer', 'table_schema': [{'col_name': 'singer id'}, {'col_name': 'name'}, {'col_name': 'birth year'}, {'col_name': 'net worth millions'}, {'col_name': 'citizenship'}], 'foreign_key_columns': [], 'primary_keys': ['singer id']}] |
Show titles of songs and names of singers. | SELECT T2.Title , T1.Name FROM singer AS T1 JOIN song AS T2 ON T1.Singer_ID = T2.Singer_ID | singer | [{'table_name': 'singer', 'table_schema': [{'col_name': 'singer id'}, {'col_name': 'name'}, {'col_name': 'birth year'}, {'col_name': 'net worth millions'}, {'col_name': 'citizenship'}], 'foreign_key_columns': [], 'primary_keys': ['singer id']}, {'table_name': 'song', 'table_schema': [{'col_name': 'song id'}, {'col_name... |
What are the song titles and singer names? | SELECT T2.Title , T1.Name FROM singer AS T1 JOIN song AS T2 ON T1.Singer_ID = T2.Singer_ID | singer | [{'table_name': 'singer', 'table_schema': [{'col_name': 'singer id'}, {'col_name': 'name'}, {'col_name': 'birth year'}, {'col_name': 'net worth millions'}, {'col_name': 'citizenship'}], 'foreign_key_columns': [], 'primary_keys': ['singer id']}, {'table_name': 'song', 'table_schema': [{'col_name': 'song id'}, {'col_name... |
Show distinct names of singers that have songs with sales more than 300000. | SELECT DISTINCT T1.Name FROM singer AS T1 JOIN song AS T2 ON T1.Singer_ID = T2.Singer_ID WHERE T2.Sales > 300000 | singer | [{'table_name': 'singer', 'table_schema': [{'col_name': 'singer id'}, {'col_name': 'name'}, {'col_name': 'birth year'}, {'col_name': 'net worth millions'}, {'col_name': 'citizenship'}], 'foreign_key_columns': [], 'primary_keys': ['singer id']}, {'table_name': 'song', 'table_schema': [{'col_name': 'song id'}, {'col_name... |
what are the different names of the singers that have sales more than 300000? | SELECT DISTINCT T1.Name FROM singer AS T1 JOIN song AS T2 ON T1.Singer_ID = T2.Singer_ID WHERE T2.Sales > 300000 | singer | [{'table_name': 'singer', 'table_schema': [{'col_name': 'singer id'}, {'col_name': 'name'}, {'col_name': 'birth year'}, {'col_name': 'net worth millions'}, {'col_name': 'citizenship'}], 'foreign_key_columns': [], 'primary_keys': ['singer id']}, {'table_name': 'song', 'table_schema': [{'col_name': 'song id'}, {'col_name... |
Show the names of singers that have more than one song. | SELECT T1.Name FROM singer AS T1 JOIN song AS T2 ON T1.Singer_ID = T2.Singer_ID GROUP BY T1.Name HAVING COUNT(*) > 1 | singer | [{'table_name': 'singer', 'table_schema': [{'col_name': 'singer id'}, {'col_name': 'name'}, {'col_name': 'birth year'}, {'col_name': 'net worth millions'}, {'col_name': 'citizenship'}], 'foreign_key_columns': [], 'primary_keys': ['singer id']}, {'table_name': 'song', 'table_schema': [{'col_name': 'song id'}, {'col_name... |
What are the names of the singers that have more than one songs? | SELECT T1.Name FROM singer AS T1 JOIN song AS T2 ON T1.Singer_ID = T2.Singer_ID GROUP BY T1.Name HAVING COUNT(*) > 1 | singer | [{'table_name': 'singer', 'table_schema': [{'col_name': 'singer id'}, {'col_name': 'name'}, {'col_name': 'birth year'}, {'col_name': 'net worth millions'}, {'col_name': 'citizenship'}], 'foreign_key_columns': [], 'primary_keys': ['singer id']}, {'table_name': 'song', 'table_schema': [{'col_name': 'song id'}, {'col_name... |
Show the names of singers and the total sales of their songs. | SELECT T1.Name , sum(T2.Sales) FROM singer AS T1 JOIN song AS T2 ON T1.Singer_ID = T2.Singer_ID GROUP BY T1.Name | singer | [{'table_name': 'singer', 'table_schema': [{'col_name': 'singer id'}, {'col_name': 'name'}, {'col_name': 'birth year'}, {'col_name': 'net worth millions'}, {'col_name': 'citizenship'}], 'foreign_key_columns': [], 'primary_keys': ['singer id']}, {'table_name': 'song', 'table_schema': [{'col_name': 'song id'}, {'col_name... |
For each singer name, what is the total sales for their songs? | SELECT T1.Name , sum(T2.Sales) FROM singer AS T1 JOIN song AS T2 ON T1.Singer_ID = T2.Singer_ID GROUP BY T1.Name | singer | [{'table_name': 'singer', 'table_schema': [{'col_name': 'singer id'}, {'col_name': 'name'}, {'col_name': 'birth year'}, {'col_name': 'net worth millions'}, {'col_name': 'citizenship'}], 'foreign_key_columns': [], 'primary_keys': ['singer id']}, {'table_name': 'song', 'table_schema': [{'col_name': 'song id'}, {'col_name... |
List the name of singers that do not have any song. | SELECT Name FROM singer WHERE Singer_ID NOT IN (SELECT Singer_ID FROM song) | singer | [{'table_name': 'singer', 'table_schema': [{'col_name': 'singer id'}, {'col_name': 'name'}, {'col_name': 'birth year'}, {'col_name': 'net worth millions'}, {'col_name': 'citizenship'}], 'foreign_key_columns': [], 'primary_keys': ['singer id']}, {'table_name': 'song', 'table_schema': [{'col_name': 'song id'}, {'col_name... |
What is the sname of every sing that does not have any song? | SELECT Name FROM singer WHERE Singer_ID NOT IN (SELECT Singer_ID FROM song) | singer | [{'table_name': 'singer', 'table_schema': [{'col_name': 'singer id'}, {'col_name': 'name'}, {'col_name': 'birth year'}, {'col_name': 'net worth millions'}, {'col_name': 'citizenship'}], 'foreign_key_columns': [], 'primary_keys': ['singer id']}, {'table_name': 'song', 'table_schema': [{'col_name': 'song id'}, {'col_name... |
Show the citizenship shared by singers with birth year before 1945 and after 1955. | SELECT Citizenship FROM singer WHERE Birth_Year < 1945 INTERSECT SELECT Citizenship FROM singer WHERE Birth_Year > 1955 | singer | [{'table_name': 'singer', 'table_schema': [{'col_name': 'singer id'}, {'col_name': 'name'}, {'col_name': 'birth year'}, {'col_name': 'net worth millions'}, {'col_name': 'citizenship'}], 'foreign_key_columns': [], 'primary_keys': ['singer id']}] |
What are the citizenships that are shared by singers with a birth year before 1945 and after 1955? | SELECT Citizenship FROM singer WHERE Birth_Year < 1945 INTERSECT SELECT Citizenship FROM singer WHERE Birth_Year > 1955 | singer | [{'table_name': 'singer', 'table_schema': [{'col_name': 'singer id'}, {'col_name': 'name'}, {'col_name': 'birth year'}, {'col_name': 'net worth millions'}, {'col_name': 'citizenship'}], 'foreign_key_columns': [], 'primary_keys': ['singer id']}] |
How many available features are there in total? | SELECT count(*) FROM Other_Available_Features | real_estate_properties | [] |
What is the feature type name of feature AirCon? | SELECT T2.feature_type_name FROM Other_Available_Features AS T1 JOIN Ref_Feature_Types AS T2 ON T1.feature_type_code = T2.feature_type_code WHERE T1.feature_name = "AirCon" | real_estate_properties | [] |
Show the property type descriptions of properties belonging to that code. | SELECT T2.property_type_description FROM Properties AS T1 JOIN Ref_Property_Types AS T2 ON T1.property_type_code = T2.property_type_code GROUP BY T1.property_type_code | real_estate_properties | [{'table_name': 'properties', 'table_schema': [{'col_name': 'property id'}, {'col_name': 'property type code'}, {'col_name': 'date on market'}, {'col_name': 'date sold'}, {'col_name': 'property name'}, {'col_name': 'property address'}, {'col_name': 'room count'}, {'col_name': 'vendor requested price'}, {'col_name': 'bu... |
What are the names of properties that are either houses or apartments with more than 1 room? | SELECT property_name FROM Properties WHERE property_type_code = "House" UNION SELECT property_name FROM Properties WHERE property_type_code = "Apartment" AND room_count > 1 | real_estate_properties | [{'table_name': 'properties', 'table_schema': [{'col_name': 'property id'}, {'col_name': 'property type code'}, {'col_name': 'date on market'}, {'col_name': 'date sold'}, {'col_name': 'property name'}, {'col_name': 'property address'}, {'col_name': 'room count'}, {'col_name': 'vendor requested price'}, {'col_name': 'bu... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.