output
stringlengths 18
577
| instruction
stringlengths 16
224
| input
stringclasses 160
values |
---|---|---|
SELECT count(*) FROM singer | How many singers are there? | "Schema (values (type))": singer : Singer_ID (number) , Name (text) , Birth_Year (number) , Net_Worth_Millions (number) , Citizenship (text) | song : Song_ID (number) , Title (text) , Singer_ID (number) , Sales (number) , Highest_Position (number)
"Primary Keys": singer : Singer_ID | song : Song_ID
"Foreign Keys": song : Singer_ID equals singer : Singer_ID |
SELECT count(*) FROM singer | What is the count of singers? | "Schema (values (type))": singer : Singer_ID (number) , Name (text) , Birth_Year (number) , Net_Worth_Millions (number) , Citizenship (text) | song : Song_ID (number) , Title (text) , Singer_ID (number) , Sales (number) , Highest_Position (number)
"Primary Keys": singer : Singer_ID | song : Song_ID
"Foreign Keys": song : Singer_ID equals singer : Singer_ID |
SELECT Name FROM singer ORDER BY Net_Worth_Millions ASC | List the name of singers in ascending order of net worth. | "Schema (values (type))": singer : Singer_ID (number) , Name (text) , Birth_Year (number) , Net_Worth_Millions (number) , Citizenship (text) | song : Song_ID (number) , Title (text) , Singer_ID (number) , Sales (number) , Highest_Position (number)
"Primary Keys": singer : Singer_ID | song : Song_ID
"Foreign Keys": song : Singer_ID equals singer : Singer_ID |
SELECT Name FROM singer ORDER BY Net_Worth_Millions ASC | What are the names of singers ordered by ascending net worth? | "Schema (values (type))": singer : Singer_ID (number) , Name (text) , Birth_Year (number) , Net_Worth_Millions (number) , Citizenship (text) | song : Song_ID (number) , Title (text) , Singer_ID (number) , Sales (number) , Highest_Position (number)
"Primary Keys": singer : Singer_ID | song : Song_ID
"Foreign Keys": song : Singer_ID equals singer : Singer_ID |
SELECT Birth_Year , Citizenship FROM singer | What are the birth year and citizenship of singers? | "Schema (values (type))": singer : Singer_ID (number) , Name (text) , Birth_Year (number) , Net_Worth_Millions (number) , Citizenship (text) | song : Song_ID (number) , Title (text) , Singer_ID (number) , Sales (number) , Highest_Position (number)
"Primary Keys": singer : Singer_ID | song : Song_ID
"Foreign Keys": song : Singer_ID equals singer : Singer_ID |
SELECT Birth_Year , Citizenship FROM singer | What are the birth years and citizenships of the singers? | "Schema (values (type))": singer : Singer_ID (number) , Name (text) , Birth_Year (number) , Net_Worth_Millions (number) , Citizenship (text) | song : Song_ID (number) , Title (text) , Singer_ID (number) , Sales (number) , Highest_Position (number)
"Primary Keys": singer : Singer_ID | song : Song_ID
"Foreign Keys": song : Singer_ID equals singer : Singer_ID |
SELECT Name FROM singer WHERE Citizenship != "France" | List the name of singers whose citizenship is not "France". | "Schema (values (type))": singer : Singer_ID (number) , Name (text) , Birth_Year (number) , Net_Worth_Millions (number) , Citizenship (text) | song : Song_ID (number) , Title (text) , Singer_ID (number) , Sales (number) , Highest_Position (number)
"Primary Keys": singer : Singer_ID | song : Song_ID
"Foreign Keys": song : Singer_ID equals singer : Singer_ID |
SELECT Name FROM singer WHERE Citizenship != "France" | What are the names of the singers who are not French citizens? | "Schema (values (type))": singer : Singer_ID (number) , Name (text) , Birth_Year (number) , Net_Worth_Millions (number) , Citizenship (text) | song : Song_ID (number) , Title (text) , Singer_ID (number) , Sales (number) , Highest_Position (number)
"Primary Keys": singer : Singer_ID | song : Song_ID
"Foreign Keys": song : Singer_ID equals singer : Singer_ID |
SELECT Name FROM singer WHERE Birth_Year = 1948 OR Birth_Year = 1949 | Show the name of singers whose birth year is either 1948 or 1949? | "Schema (values (type))": singer : Singer_ID (number) , Name (text) , Birth_Year (number) , Net_Worth_Millions (number) , Citizenship (text) | song : Song_ID (number) , Title (text) , Singer_ID (number) , Sales (number) , Highest_Position (number)
"Primary Keys": singer : Singer_ID | song : Song_ID
"Foreign Keys": song : Singer_ID equals singer : Singer_ID |
SELECT Name FROM singer WHERE Birth_Year = 1948 OR Birth_Year = 1949 | What are the names of the singers whose birth years are either 1948 or 1949? | "Schema (values (type))": singer : Singer_ID (number) , Name (text) , Birth_Year (number) , Net_Worth_Millions (number) , Citizenship (text) | song : Song_ID (number) , Title (text) , Singer_ID (number) , Sales (number) , Highest_Position (number)
"Primary Keys": singer : Singer_ID | song : Song_ID
"Foreign Keys": song : Singer_ID equals singer : Singer_ID |
SELECT Name FROM singer ORDER BY Net_Worth_Millions DESC LIMIT 1 | What is the name of the singer with the largest net worth? | "Schema (values (type))": singer : Singer_ID (number) , Name (text) , Birth_Year (number) , Net_Worth_Millions (number) , Citizenship (text) | song : Song_ID (number) , Title (text) , Singer_ID (number) , Sales (number) , Highest_Position (number)
"Primary Keys": singer : Singer_ID | song : Song_ID
"Foreign Keys": song : Singer_ID equals singer : Singer_ID |
SELECT Name FROM singer ORDER BY Net_Worth_Millions DESC LIMIT 1 | What is the name of the singer who is worth the most? | "Schema (values (type))": singer : Singer_ID (number) , Name (text) , Birth_Year (number) , Net_Worth_Millions (number) , Citizenship (text) | song : Song_ID (number) , Title (text) , Singer_ID (number) , Sales (number) , Highest_Position (number)
"Primary Keys": singer : Singer_ID | song : Song_ID
"Foreign Keys": song : Singer_ID equals singer : Singer_ID |
SELECT Citizenship , COUNT(*) FROM singer GROUP BY Citizenship | Show different citizenship of singers and the number of singers of each citizenship. | "Schema (values (type))": singer : Singer_ID (number) , Name (text) , Birth_Year (number) , Net_Worth_Millions (number) , Citizenship (text) | song : Song_ID (number) , Title (text) , Singer_ID (number) , Sales (number) , Highest_Position (number)
"Primary Keys": singer : Singer_ID | song : Song_ID
"Foreign Keys": song : Singer_ID equals singer : Singer_ID |
SELECT Citizenship , COUNT(*) FROM singer GROUP BY Citizenship | For each citizenship, how many singers are from that country? | "Schema (values (type))": singer : Singer_ID (number) , Name (text) , Birth_Year (number) , Net_Worth_Millions (number) , Citizenship (text) | song : Song_ID (number) , Title (text) , Singer_ID (number) , Sales (number) , Highest_Position (number)
"Primary Keys": singer : Singer_ID | song : Song_ID
"Foreign Keys": song : Singer_ID equals singer : Singer_ID |
SELECT Citizenship FROM singer GROUP BY Citizenship ORDER BY COUNT(*) DESC LIMIT 1 | Please show the most common citizenship of singers. | "Schema (values (type))": singer : Singer_ID (number) , Name (text) , Birth_Year (number) , Net_Worth_Millions (number) , Citizenship (text) | song : Song_ID (number) , Title (text) , Singer_ID (number) , Sales (number) , Highest_Position (number)
"Primary Keys": singer : Singer_ID | song : Song_ID
"Foreign Keys": song : Singer_ID equals singer : Singer_ID |
select citizenship from singer group by citizenship order by count(*) desc limit 1 | What is the most common singer citizenship ? | "Schema (values (type))": singer : Singer_ID (number) , Name (text) , Birth_Year (number) , Net_Worth_Millions (number) , Citizenship (text) | song : Song_ID (number) , Title (text) , Singer_ID (number) , Sales (number) , Highest_Position (number)
"Primary Keys": singer : Singer_ID | song : Song_ID
"Foreign Keys": song : Singer_ID equals singer : Singer_ID |
SELECT Citizenship , max(Net_Worth_Millions) FROM singer GROUP BY Citizenship | Show different citizenships and the maximum net worth of singers of each citizenship. | "Schema (values (type))": singer : Singer_ID (number) , Name (text) , Birth_Year (number) , Net_Worth_Millions (number) , Citizenship (text) | song : Song_ID (number) , Title (text) , Singer_ID (number) , Sales (number) , Highest_Position (number)
"Primary Keys": singer : Singer_ID | song : Song_ID
"Foreign Keys": song : Singer_ID equals singer : Singer_ID |
SELECT Citizenship , max(Net_Worth_Millions) FROM singer GROUP BY Citizenship | For each citizenship, what is the maximum net worth? | "Schema (values (type))": singer : Singer_ID (number) , Name (text) , Birth_Year (number) , Net_Worth_Millions (number) , Citizenship (text) | song : Song_ID (number) , Title (text) , Singer_ID (number) , Sales (number) , Highest_Position (number)
"Primary Keys": singer : Singer_ID | song : Song_ID
"Foreign Keys": song : Singer_ID equals singer : Singer_ID |
SELECT T2.Title , T1.Name FROM singer AS T1 JOIN song AS T2 ON T1.Singer_ID = T2.Singer_ID | Show titles of songs and names of singers. | "Schema (values (type))": singer : Singer_ID (number) , Name (text) , Birth_Year (number) , Net_Worth_Millions (number) , Citizenship (text) | song : Song_ID (number) , Title (text) , Singer_ID (number) , Sales (number) , Highest_Position (number)
"Primary Keys": singer : Singer_ID | song : Song_ID
"Foreign Keys": song : Singer_ID equals singer : Singer_ID |
SELECT T2.Title , T1.Name FROM singer AS T1 JOIN song AS T2 ON T1.Singer_ID = T2.Singer_ID | What are the song titles and singer names? | "Schema (values (type))": singer : Singer_ID (number) , Name (text) , Birth_Year (number) , Net_Worth_Millions (number) , Citizenship (text) | song : Song_ID (number) , Title (text) , Singer_ID (number) , Sales (number) , Highest_Position (number)
"Primary Keys": singer : Singer_ID | song : Song_ID
"Foreign Keys": song : Singer_ID equals singer : Singer_ID |
SELECT DISTINCT T1.Name FROM singer AS T1 JOIN song AS T2 ON T1.Singer_ID = T2.Singer_ID WHERE T2.Sales > 300000 | Show distinct names of singers that have songs with sales more than 300000. | "Schema (values (type))": singer : Singer_ID (number) , Name (text) , Birth_Year (number) , Net_Worth_Millions (number) , Citizenship (text) | song : Song_ID (number) , Title (text) , Singer_ID (number) , Sales (number) , Highest_Position (number)
"Primary Keys": singer : Singer_ID | song : Song_ID
"Foreign Keys": song : Singer_ID equals singer : Singer_ID |
SELECT DISTINCT T1.Name FROM singer AS T1 JOIN song AS T2 ON T1.Singer_ID = T2.Singer_ID WHERE T2.Sales > 300000 | what are the different names of the singers that have sales more than 300000? | "Schema (values (type))": singer : Singer_ID (number) , Name (text) , Birth_Year (number) , Net_Worth_Millions (number) , Citizenship (text) | song : Song_ID (number) , Title (text) , Singer_ID (number) , Sales (number) , Highest_Position (number)
"Primary Keys": singer : Singer_ID | song : Song_ID
"Foreign Keys": song : Singer_ID equals singer : Singer_ID |
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 | Show the names of singers that have more than one song. | "Schema (values (type))": singer : Singer_ID (number) , Name (text) , Birth_Year (number) , Net_Worth_Millions (number) , Citizenship (text) | song : Song_ID (number) , Title (text) , Singer_ID (number) , Sales (number) , Highest_Position (number)
"Primary Keys": singer : Singer_ID | song : Song_ID
"Foreign Keys": song : Singer_ID equals singer : Singer_ID |
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 | What are the names of the singers that have more than one songs? | "Schema (values (type))": singer : Singer_ID (number) , Name (text) , Birth_Year (number) , Net_Worth_Millions (number) , Citizenship (text) | song : Song_ID (number) , Title (text) , Singer_ID (number) , Sales (number) , Highest_Position (number)
"Primary Keys": singer : Singer_ID | song : Song_ID
"Foreign Keys": song : Singer_ID equals singer : Singer_ID |
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 | Show the names of singers and the total sales of their songs. | "Schema (values (type))": singer : Singer_ID (number) , Name (text) , Birth_Year (number) , Net_Worth_Millions (number) , Citizenship (text) | song : Song_ID (number) , Title (text) , Singer_ID (number) , Sales (number) , Highest_Position (number)
"Primary Keys": singer : Singer_ID | song : Song_ID
"Foreign Keys": song : Singer_ID equals singer : Singer_ID |
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 | For each singer name, what is the total sales for their songs? | "Schema (values (type))": singer : Singer_ID (number) , Name (text) , Birth_Year (number) , Net_Worth_Millions (number) , Citizenship (text) | song : Song_ID (number) , Title (text) , Singer_ID (number) , Sales (number) , Highest_Position (number)
"Primary Keys": singer : Singer_ID | song : Song_ID
"Foreign Keys": song : Singer_ID equals singer : Singer_ID |
SELECT Name FROM singer WHERE Singer_ID NOT IN (SELECT Singer_ID FROM song) | List the name of singers that do not have any song. | "Schema (values (type))": singer : Singer_ID (number) , Name (text) , Birth_Year (number) , Net_Worth_Millions (number) , Citizenship (text) | song : Song_ID (number) , Title (text) , Singer_ID (number) , Sales (number) , Highest_Position (number)
"Primary Keys": singer : Singer_ID | song : Song_ID
"Foreign Keys": song : Singer_ID equals singer : Singer_ID |
SELECT Name FROM singer WHERE Singer_ID NOT IN (SELECT Singer_ID FROM song) | What is the sname of every sing that does not have any song? | "Schema (values (type))": singer : Singer_ID (number) , Name (text) , Birth_Year (number) , Net_Worth_Millions (number) , Citizenship (text) | song : Song_ID (number) , Title (text) , Singer_ID (number) , Sales (number) , Highest_Position (number)
"Primary Keys": singer : Singer_ID | song : Song_ID
"Foreign Keys": song : Singer_ID equals singer : Singer_ID |
SELECT Citizenship FROM singer WHERE Birth_Year < 1945 INTERSECT SELECT Citizenship FROM singer WHERE Birth_Year > 1955 | Show the citizenship shared by singers with birth year before 1945 and after 1955. | "Schema (values (type))": singer : Singer_ID (number) , Name (text) , Birth_Year (number) , Net_Worth_Millions (number) , Citizenship (text) | song : Song_ID (number) , Title (text) , Singer_ID (number) , Sales (number) , Highest_Position (number)
"Primary Keys": singer : Singer_ID | song : Song_ID
"Foreign Keys": song : Singer_ID equals singer : Singer_ID |
SELECT Citizenship FROM singer WHERE Birth_Year < 1945 INTERSECT SELECT Citizenship FROM singer WHERE Birth_Year > 1955 | What are the citizenships that are shared by singers with a birth year before 1945 and after 1955? | "Schema (values (type))": singer : Singer_ID (number) , Name (text) , Birth_Year (number) , Net_Worth_Millions (number) , Citizenship (text) | song : Song_ID (number) , Title (text) , Singer_ID (number) , Sales (number) , Highest_Position (number)
"Primary Keys": singer : Singer_ID | song : Song_ID
"Foreign Keys": song : Singer_ID equals singer : Singer_ID |
SELECT count(*) FROM Other_Available_Features | How many available features are there in total? | "Schema (values (type))": Ref_Feature_Types : feature_type_code (text) , feature_type_name (text) | Ref_Property_Types : property_type_code (text) , property_type_description (text) | Other_Available_Features : feature_id (number) , feature_type_code (text) , feature_name (text) , feature_description (text) | Properties : property_id (number) , property_type_code (text) , date_on_market (time) , date_sold (time) , property_name (text) , property_address (text) , room_count (number) , vendor_requested_price (number) , buyer_offered_price (number) , agreed_selling_price (number) , apt_feature_1 (text) , apt_feature_2 (text) , apt_feature_3 (text) , fld_feature_1 (text) , fld_feature_2 (text) , fld_feature_3 (text) , hse_feature_1 (text) , hse_feature_2 (text) , hse_feature_3 (text) , oth_feature_1 (text) , oth_feature_2 (text) , oth_feature_3 (text) , shp_feature_1 (text) , shp_feature_2 (text) , shp_feature_3 (text) , other_property_details (text) | Other_Property_Features : property_id (number) , feature_id (number) , property_feature_description (text)
"Primary Keys": Ref_Feature_Types : feature_type_code | Ref_Property_Types : property_type_code | Other_Available_Features : feature_id | Properties : property_id
"Foreign Keys": Other_Available_Features : feature_type_code equals Ref_Feature_Types : feature_type_code | Properties : property_type_code equals Ref_Property_Types : property_type_code | Other_Property_Features : property_id equals Properties : property_id | Other_Property_Features : feature_id equals Other_Available_Features : feature_id |
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" | What is the feature type name of feature AirCon? | "Schema (values (type))": Ref_Feature_Types : feature_type_code (text) , feature_type_name (text) | Ref_Property_Types : property_type_code (text) , property_type_description (text) | Other_Available_Features : feature_id (number) , feature_type_code (text) , feature_name (text) , feature_description (text) | Properties : property_id (number) , property_type_code (text) , date_on_market (time) , date_sold (time) , property_name (text) , property_address (text) , room_count (number) , vendor_requested_price (number) , buyer_offered_price (number) , agreed_selling_price (number) , apt_feature_1 (text) , apt_feature_2 (text) , apt_feature_3 (text) , fld_feature_1 (text) , fld_feature_2 (text) , fld_feature_3 (text) , hse_feature_1 (text) , hse_feature_2 (text) , hse_feature_3 (text) , oth_feature_1 (text) , oth_feature_2 (text) , oth_feature_3 (text) , shp_feature_1 (text) , shp_feature_2 (text) , shp_feature_3 (text) , other_property_details (text) | Other_Property_Features : property_id (number) , feature_id (number) , property_feature_description (text)
"Primary Keys": Ref_Feature_Types : feature_type_code | Ref_Property_Types : property_type_code | Other_Available_Features : feature_id | Properties : property_id
"Foreign Keys": Other_Available_Features : feature_type_code equals Ref_Feature_Types : feature_type_code | Properties : property_type_code equals Ref_Property_Types : property_type_code | Other_Property_Features : property_id equals Properties : property_id | Other_Property_Features : feature_id equals Other_Available_Features : feature_id |
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 | Show the property type descriptions of properties belonging to that code. | "Schema (values (type))": Ref_Feature_Types : feature_type_code (text) , feature_type_name (text) | Ref_Property_Types : property_type_code (text) , property_type_description (text) | Other_Available_Features : feature_id (number) , feature_type_code (text) , feature_name (text) , feature_description (text) | Properties : property_id (number) , property_type_code (text) , date_on_market (time) , date_sold (time) , property_name (text) , property_address (text) , room_count (number) , vendor_requested_price (number) , buyer_offered_price (number) , agreed_selling_price (number) , apt_feature_1 (text) , apt_feature_2 (text) , apt_feature_3 (text) , fld_feature_1 (text) , fld_feature_2 (text) , fld_feature_3 (text) , hse_feature_1 (text) , hse_feature_2 (text) , hse_feature_3 (text) , oth_feature_1 (text) , oth_feature_2 (text) , oth_feature_3 (text) , shp_feature_1 (text) , shp_feature_2 (text) , shp_feature_3 (text) , other_property_details (text) | Other_Property_Features : property_id (number) , feature_id (number) , property_feature_description (text)
"Primary Keys": Ref_Feature_Types : feature_type_code | Ref_Property_Types : property_type_code | Other_Available_Features : feature_id | Properties : property_id
"Foreign Keys": Other_Available_Features : feature_type_code equals Ref_Feature_Types : feature_type_code | Properties : property_type_code equals Ref_Property_Types : property_type_code | Other_Property_Features : property_id equals Properties : property_id | Other_Property_Features : feature_id equals Other_Available_Features : feature_id |
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 | What are the names of properties that are either houses or apartments with more than 1 room? | "Schema (values (type))": Ref_Feature_Types : feature_type_code (text) , feature_type_name (text) | Ref_Property_Types : property_type_code (text) , property_type_description (text) | Other_Available_Features : feature_id (number) , feature_type_code (text) , feature_name (text) , feature_description (text) | Properties : property_id (number) , property_type_code (text) , date_on_market (time) , date_sold (time) , property_name (text) , property_address (text) , room_count (number) , vendor_requested_price (number) , buyer_offered_price (number) , agreed_selling_price (number) , apt_feature_1 (text) , apt_feature_2 (text) , apt_feature_3 (text) , fld_feature_1 (text) , fld_feature_2 (text) , fld_feature_3 (text) , hse_feature_1 (text) , hse_feature_2 (text) , hse_feature_3 (text) , oth_feature_1 (text) , oth_feature_2 (text) , oth_feature_3 (text) , shp_feature_1 (text) , shp_feature_2 (text) , shp_feature_3 (text) , other_property_details (text) | Other_Property_Features : property_id (number) , feature_id (number) , property_feature_description (text)
"Primary Keys": Ref_Feature_Types : feature_type_code | Ref_Property_Types : property_type_code | Other_Available_Features : feature_id | Properties : property_id
"Foreign Keys": Other_Available_Features : feature_type_code equals Ref_Feature_Types : feature_type_code | Properties : property_type_code equals Ref_Property_Types : property_type_code | Other_Property_Features : property_id equals Properties : property_id | Other_Property_Features : feature_id equals Other_Available_Features : feature_id |