db_id stringlengths 4 31 | SQL stringlengths 18 1.45k | input_sequence stringlengths 148 11k | question stringlengths 16 325 |
|---|---|---|---|
dog_kennels | select first_name , last_name , email_address from owners where state like '%north%' | Question: which owners live in the state whose name contains the substring 'north'? list his first name, last name and email. | Tables: Breeds -> breed_code, breed_name. Charges -> charge_id, charge_type, charge_amount. Sizes -> size_code, size_description. Treatment_Types -> treatment_type_code, treatment_type_descrip... | which owners live in the state whose name contains the substring 'north'? list his first name, last name and email. |
dog_kennels | select first_name , last_name , email_address from owners where state like '%north%' | Question: return the first name, last name and email of the owners living in a state whose name contains the substring 'north'. | Tables: Breeds -> breed_code, breed_name. Charges -> charge_id, charge_type, charge_amount. Sizes -> size_code, size_description. Treatment_Types -> treatment_type_code, treatment_type_descr... | return the first name, last name and email of the owners living in a state whose name contains the substring 'north'. |
dog_kennels | select count(*) from dogs where age < ( select avg(age) from dogs ) | Question: how many dogs have an age below the average? | Tables: Breeds -> breed_code, breed_name. Charges -> charge_id, charge_type, charge_amount. Sizes -> size_code, size_description. Treatment_Types -> treatment_type_code, treatment_type_description. Owners -> owner_id, first_name, last_name, street, city, state, z... | how many dogs have an age below the average? |
dog_kennels | select count(*) from dogs where age < ( select avg(age) from dogs ) | Question: count the number of dogs of an age below the average. | Tables: Breeds -> breed_code, breed_name. Charges -> charge_id, charge_type, charge_amount. Sizes -> size_code, size_description. Treatment_Types -> treatment_type_code, treatment_type_description. Owners -> owner_id, first_name, last_name, street, city,... | count the number of dogs of an age below the average. |
dog_kennels | select cost_of_treatment from treatments order by date_of_treatment desc limit 1 | Question: how much does the most recent treatment cost? | Tables: Breeds -> breed_code, breed_name. Charges -> charge_id, charge_type, charge_amount. Sizes -> size_code, size_description. Treatment_Types -> treatment_type_code, treatment_type_description. Owners -> owner_id, first_name, last_name, street, city, state, ... | how much does the most recent treatment cost? |
dog_kennels | select cost_of_treatment from treatments order by date_of_treatment desc limit 1 | Question: show me the cost of the most recently performed treatment. | Tables: Breeds -> breed_code, breed_name. Charges -> charge_id, charge_type, charge_amount. Sizes -> size_code, size_description. Treatment_Types -> treatment_type_code, treatment_type_description. Owners -> owner_id, first_name, last_name, street, ... | show me the cost of the most recently performed treatment. |
dog_kennels | select count(*) from dogs where dog_id not in ( select dog_id from treatments ) | Question: how many dogs have not gone through any treatment? | Tables: Breeds -> breed_code, breed_name. Charges -> charge_id, charge_type, charge_amount. Sizes -> size_code, size_description. Treatment_Types -> treatment_type_code, treatment_type_description. Owners -> owner_id, first_name, last_name, street, city, st... | how many dogs have not gone through any treatment? |
dog_kennels | select count(*) from dogs where dog_id not in ( select dog_id from treatments ) | Question: tell me the number of dogs that have not received any treatment . | Tables: Breeds -> breed_code, breed_name. Charges -> charge_id, charge_type, charge_amount. Sizes -> size_code, size_description. Treatment_Types -> treatment_type_code, treatment_type_description. Owners -> owner_id, first_name, last_name, s... | tell me the number of dogs that have not received any treatment . |
dog_kennels | select count(*) from owners where owner_id not in ( select owner_id from dogs ) | Question: how many owners temporarily do not have any dogs? | Tables: Breeds -> breed_code, breed_name. Charges -> charge_id, charge_type, charge_amount. Sizes -> size_code, size_description. Treatment_Types -> treatment_type_code, treatment_type_description. Owners -> owner_id, first_name, last_name, street, city, sta... | how many owners temporarily do not have any dogs? |
dog_kennels | select count(*) from owners where owner_id not in ( select owner_id from dogs ) | Question: find the number of owners who do not own any dogs at this moment. | Tables: Breeds -> breed_code, breed_name. Charges -> charge_id, charge_type, charge_amount. Sizes -> size_code, size_description. Treatment_Types -> treatment_type_code, treatment_type_description. Owners -> owner_id, first_name, last_name, s... | find the number of owners who do not own any dogs at this moment. |
dog_kennels | select count(*) from professionals where professional_id not in ( select professional_id from treatments ) | Question: how many professionals did not operate any treatment on dogs? | Tables: Breeds -> breed_code, breed_name. Charges -> charge_id, charge_type, charge_amount. Sizes -> size_code, size_description. Treatment_Types -> treatment_type_code, treatment_type_description. Owners -> owner_id, first_name, last_name, stree... | how many professionals did not operate any treatment on dogs? |
dog_kennels | select count(*) from professionals where professional_id not in ( select professional_id from treatments ) | Question: find the number of professionals who have not treated any dogs. | Tables: Breeds -> breed_code, breed_name. Charges -> charge_id, charge_type, charge_amount. Sizes -> size_code, size_description. Treatment_Types -> treatment_type_code, treatment_type_description. Owners -> owner_id, first_name, last_name, str... | find the number of professionals who have not treated any dogs. |
dog_kennels | select name , age , weight from dogs where abandoned_yn = 1 | Question: list the dog name, age and weight of the dogs who have been abandoned? 1 stands for yes, and 0 stands for no. | Tables: Breeds -> breed_code, breed_name. Charges -> charge_id, charge_type, charge_amount. Sizes -> size_code, size_description. Treatment_Types -> treatment_type_code, treatment_type_description. ... | list the dog name, age and weight of the dogs who have been abandoned? 1 stands for yes, and 0 stands for no. |
dog_kennels | select name , age , weight from dogs where abandoned_yn = 1 | Question: what are the dog name, age and weight of the dogs that were abandoned? note that 1 stands for yes, and 0 stands for no in the tables. | Tables: Breeds -> breed_code, breed_name. Charges -> charge_id, charge_type, charge_amount. Sizes -> size_code, size_description. Treatment_Types -> treatment_type_code, trea... | what are the dog name, age and weight of the dogs that were abandoned? note that 1 stands for yes, and 0 stands for no in the tables. |
dog_kennels | select avg(age) from dogs | Question: what is the average age of all the dogs? | Tables: Breeds -> breed_code, breed_name. Charges -> charge_id, charge_type, charge_amount. Sizes -> size_code, size_description. Treatment_Types -> treatment_type_code, treatment_type_description. Owners -> owner_id, first_name, last_name, street, city, state, zip_c... | what is the average age of all the dogs? |
dog_kennels | select avg(age) from dogs | Question: compute the average age of all the dogs. | Tables: Breeds -> breed_code, breed_name. Charges -> charge_id, charge_type, charge_amount. Sizes -> size_code, size_description. Treatment_Types -> treatment_type_code, treatment_type_description. Owners -> owner_id, first_name, last_name, street, city, state, zip_c... | compute the average age of all the dogs. |
dog_kennels | select max(age) from dogs | Question: what is the age of the oldest dog? | Tables: Breeds -> breed_code, breed_name. Charges -> charge_id, charge_type, charge_amount. Sizes -> size_code, size_description. Treatment_Types -> treatment_type_code, treatment_type_description. Owners -> owner_id, first_name, last_name, street, city, state, zip_code, e... | what is the age of the oldest dog? |
dog_kennels | select max(age) from dogs | Question: tell me the age of the oldest dog. | Tables: Breeds -> breed_code, breed_name. Charges -> charge_id, charge_type, charge_amount. Sizes -> size_code, size_description. Treatment_Types -> treatment_type_code, treatment_type_description. Owners -> owner_id, first_name, last_name, street, city, state, zip_code, e... | tell me the age of the oldest dog. |
dog_kennels | select charge_type , charge_amount from charges | Question: how much does each charge type costs? list both charge type and amount. | Tables: Breeds -> breed_code, breed_name. Charges -> charge_id, charge_type, charge_amount. Sizes -> size_code, size_description. Treatment_Types -> treatment_type_code, treatment_type_description. Owners -> owner_id, first_name, last_n... | how much does each charge type costs? list both charge type and amount. |
dog_kennels | select charge_type , charge_amount from charges | Question: list each charge type and its amount. | Tables: Breeds -> breed_code, breed_name. Charges -> charge_id, charge_type, charge_amount. Sizes -> size_code, size_description. Treatment_Types -> treatment_type_code, treatment_type_description. Owners -> owner_id, first_name, last_name, street, city, state, zip_code... | list each charge type and its amount. |
dog_kennels | select max(charge_amount) from charges | Question: how much does the most expensive charge type costs? | Tables: Breeds -> breed_code, breed_name. Charges -> charge_id, charge_type, charge_amount. Sizes -> size_code, size_description. Treatment_Types -> treatment_type_code, treatment_type_description. Owners -> owner_id, first_name, last_name, street, city, s... | how much does the most expensive charge type costs? |
dog_kennels | select max(charge_amount) from charges | Question: what is the charge amount of the most expensive charge type? | Tables: Breeds -> breed_code, breed_name. Charges -> charge_id, charge_type, charge_amount. Sizes -> size_code, size_description. Treatment_Types -> treatment_type_code, treatment_type_description. Owners -> owner_id, first_name, last_name, street... | what is the charge amount of the most expensive charge type? |
dog_kennels | select email_address , cell_number , home_phone from professionals | Question: list the email, cell phone and home phone of all the professionals. | Tables: Breeds -> breed_code, breed_name. Charges -> charge_id, charge_type, charge_amount. Sizes -> size_code, size_description. Treatment_Types -> treatment_type_code, treatment_type_description. Owners -> owner_id, first_name, last_name,... | list the email, cell phone and home phone of all the professionals. |
dog_kennels | select email_address , cell_number , home_phone from professionals | Question: what are the email, cell phone and home phone of each professional? | Tables: Breeds -> breed_code, breed_name. Charges -> charge_id, charge_type, charge_amount. Sizes -> size_code, size_description. Treatment_Types -> treatment_type_code, treatment_type_description. Owners -> owner_id, first_name, last_name,... | what are the email, cell phone and home phone of each professional? |
dog_kennels | select distinct breed_code , size_code from dogs | Question: what are all the possible breed type and size type combinations? | Tables: Breeds -> breed_code, breed_name. Charges -> charge_id, charge_type, charge_amount. Sizes -> size_code, size_description. Treatment_Types -> treatment_type_code, treatment_type_description. Owners -> owner_id, first_name, last_name, st... | what are all the possible breed type and size type combinations? |
dog_kennels | select distinct breed_code , size_code from dogs | Question: find the distinct breed type and size type combinations for dogs. | Tables: Breeds -> breed_code, breed_name. Charges -> charge_id, charge_type, charge_amount. Sizes -> size_code, size_description. Treatment_Types -> treatment_type_code, treatment_type_description. Owners -> owner_id, first_name, last_name, s... | find the distinct breed type and size type combinations for dogs. |
dog_kennels | select distinct t1.first_name , t3.treatment_type_description from professionals as t1 join treatments as t2 on t1.professional_id = t2.professional_id join treatment_types as t3 on t2.treatment_type_code = t3.treatment_type_code | Question: list the first name of all the professionals along with the description of the treatment they have done. | Tables: Breeds -> breed_code, breed_name. Charges -> charge_id, charge_type, charge_amount. Sizes -> size_code, size_description. Treatment_Types -> treatment_type_code, treatment_type_description. Owner... | list the first name of all the professionals along with the description of the treatment they have done. |
dog_kennels | select distinct t1.first_name , t3.treatment_type_description from professionals as t1 join treatments as t2 on t1.professional_id = t2.professional_id join treatment_types as t3 on t2.treatment_type_code = t3.treatment_type_code | Question: what are each professional's first name and description of the treatment they have performed? | Tables: Breeds -> breed_code, breed_name. Charges -> charge_id, charge_type, charge_amount. Sizes -> size_code, size_description. Treatment_Types -> treatment_type_code, treatment_type_description. Owners -> owner_... | what are each professional's first name and description of the treatment they have performed? |
singer | select count(*) from singer | Question: how many singers are there? | Tables: singer -> Singer_ID, Name, Birth_Year, Net_Worth_Millions, Citizenship. song -> Song_ID, Title, Singer_ID, Sales, Highest_Position. | Joins: song.Singer_ID = singer.Singer_ID, | how many singers are there? |
singer | select count(*) from singer | Question: what is the count of singers? | Tables: singer -> Singer_ID, Name, Birth_Year, Net_Worth_Millions, Citizenship. song -> Song_ID, Title, Singer_ID, Sales, Highest_Position. | Joins: song.Singer_ID = singer.Singer_ID, | what is the count of singers? |
singer | select name from singer order by net_worth_millions asc | Question: list the name of singers in ascending order of net worth. | Tables: singer -> Singer_ID, Name, Birth_Year, Net_Worth_Millions, Citizenship. song -> Song_ID, Title, Singer_ID, Sales, Highest_Position. | Joins: song.Singer_ID = singer.Singer_ID, | list the name of singers in ascending order of net worth. |
singer | select name from singer order by net_worth_millions asc | Question: what are the names of singers ordered by ascending net worth? | Tables: singer -> Singer_ID, Name, Birth_Year, Net_Worth_Millions, Citizenship. song -> Song_ID, Title, Singer_ID, Sales, Highest_Position. | Joins: song.Singer_ID = singer.Singer_ID, | what are the names of singers ordered by ascending net worth? |
singer | select birth_year , citizenship from singer | Question: what are the birth year and citizenship of singers? | Tables: singer -> Singer_ID, Name, Birth_Year, Net_Worth_Millions, Citizenship. song -> Song_ID, Title, Singer_ID, Sales, Highest_Position. | Joins: song.Singer_ID = singer.Singer_ID, | what are the birth year and citizenship of singers? |
singer | select birth_year , citizenship from singer | Question: what are the birth years and citizenships of the singers? | Tables: singer -> Singer_ID, Name, Birth_Year, Net_Worth_Millions, Citizenship. song -> Song_ID, Title, Singer_ID, Sales, Highest_Position. | Joins: song.Singer_ID = singer.Singer_ID, | what are the birth years and citizenships of the singers? |
singer | select name from singer where citizenship != 'france' | Question: list the name of singers whose citizenship is not 'france'. | Tables: singer -> Singer_ID, Name, Birth_Year, Net_Worth_Millions, Citizenship. song -> Song_ID, Title, Singer_ID, Sales, Highest_Position. | Joins: song.Singer_ID = singer.Singer_ID, | list the name of singers whose citizenship is not 'france'. |
singer | select name from singer where citizenship != 'france' | Question: what are the names of the singers who are not french citizens? | Tables: singer -> Singer_ID, Name, Birth_Year, Net_Worth_Millions, Citizenship. song -> Song_ID, Title, Singer_ID, Sales, Highest_Position. | Joins: song.Singer_ID = singer.Singer_ID, | what are the names of the singers who are not french citizens? |
singer | select name from singer where birth_year = 1948 or birth_year = 1949 | Question: show the name of singers whose birth year is either 1948 or 1949? | Tables: singer -> Singer_ID, Name, Birth_Year, Net_Worth_Millions, Citizenship. song -> Song_ID, Title, Singer_ID, Sales, Highest_Position. | Joins: song.Singer_ID = singer.Singer_ID, | show the name of singers whose birth year is either 1948 or 1949? |
singer | select name from singer where birth_year = 1948 or birth_year = 1949 | Question: what are the names of the singers whose birth years are either 1948 or 1949? | Tables: singer -> Singer_ID, Name, Birth_Year, Net_Worth_Millions, Citizenship. song -> Song_ID, Title, Singer_ID, Sales, Highest_Position. | Joins: song.Singer_ID = singer.Singer_ID, | what are the names of the singers whose birth years are either 1948 or 1949? |
singer | select name from singer order by net_worth_millions desc limit 1 | Question: what is the name of the singer with the largest net worth? | Tables: singer -> Singer_ID, Name, Birth_Year, Net_Worth_Millions, Citizenship. song -> Song_ID, Title, Singer_ID, Sales, Highest_Position. | Joins: song.Singer_ID = singer.Singer_ID, | what is the name of the singer with the largest net worth? |
singer | select name from singer order by net_worth_millions desc limit 1 | Question: what is the name of the singer who is worth the most? | Tables: singer -> Singer_ID, Name, Birth_Year, Net_Worth_Millions, Citizenship. song -> Song_ID, Title, Singer_ID, Sales, Highest_Position. | Joins: song.Singer_ID = singer.Singer_ID, | what is the name of the singer who is worth the most? |
singer | select citizenship , count(*) from singer group by citizenship | Question: show different citizenship of singers and the number of singers of each citizenship. | Tables: singer -> Singer_ID, Name, Birth_Year, Net_Worth_Millions, Citizenship. song -> Song_ID, Title, Singer_ID, Sales, Highest_Position. | Joins: song.Singer_ID = singer.Singer_ID, | show different citizenship of singers and the number of singers of each citizenship. |
singer | select citizenship , count(*) from singer group by citizenship | Question: for each citizenship, how many singers are from that country? | Tables: singer -> Singer_ID, Name, Birth_Year, Net_Worth_Millions, Citizenship. song -> Song_ID, Title, Singer_ID, Sales, Highest_Position. | Joins: song.Singer_ID = singer.Singer_ID, | for each citizenship, how many singers are from that country? |
singer | select citizenship from singer group by citizenship order by count(*) desc limit 1 | Question: please show the most common citizenship of singers. | Tables: singer -> Singer_ID, Name, Birth_Year, Net_Worth_Millions, Citizenship. song -> Song_ID, Title, Singer_ID, Sales, Highest_Position. | Joins: song.Singer_ID = singer.Singer_ID, | please show the most common citizenship of singers. |
singer | select citizenship from singer group by citizenship order by count(*) desc limit 1 | Question: what is the most common singer citizenship ? | Tables: singer -> Singer_ID, Name, Birth_Year, Net_Worth_Millions, Citizenship. song -> Song_ID, Title, Singer_ID, Sales, Highest_Position. | Joins: song.Singer_ID = singer.Singer_ID, | what is the most common singer citizenship ? |
singer | select citizenship , max(net_worth_millions) from singer group by citizenship | Question: show different citizenships and the maximum net worth of singers of each citizenship. | Tables: singer -> Singer_ID, Name, Birth_Year, Net_Worth_Millions, Citizenship. song -> Song_ID, Title, Singer_ID, Sales, Highest_Position. | Joins: song.Singer_ID = singer.Singer_ID, | show different citizenships and the maximum net worth of singers of each citizenship. |
singer | select citizenship , max(net_worth_millions) from singer group by citizenship | Question: for each citizenship, what is the maximum net worth? | Tables: singer -> Singer_ID, Name, Birth_Year, Net_Worth_Millions, Citizenship. song -> Song_ID, Title, Singer_ID, Sales, Highest_Position. | Joins: song.Singer_ID = singer.Singer_ID, | for each citizenship, what is the maximum net worth? |
singer | select t2.title , t1.name from singer as t1 join song as t2 on t1.singer_id = t2.singer_id | Question: show titles of songs and names of singers. | Tables: singer -> Singer_ID, Name, Birth_Year, Net_Worth_Millions, Citizenship. song -> Song_ID, Title, Singer_ID, Sales, Highest_Position. | Joins: song.Singer_ID = singer.Singer_ID, | show titles of songs and names of singers. |
singer | select t2.title , t1.name from singer as t1 join song as t2 on t1.singer_id = t2.singer_id | Question: what are the song titles and singer names? | Tables: singer -> Singer_ID, Name, Birth_Year, Net_Worth_Millions, Citizenship. song -> Song_ID, Title, Singer_ID, Sales, Highest_Position. | Joins: song.Singer_ID = singer.Singer_ID, | what are the song titles and singer names? |
singer | select distinct t1.name from singer as t1 join song as t2 on t1.singer_id = t2.singer_id where t2.sales > 300000 | Question: show distinct names of singers that have songs with sales more than 300000. | Tables: singer -> Singer_ID, Name, Birth_Year, Net_Worth_Millions, Citizenship. song -> Song_ID, Title, Singer_ID, Sales, Highest_Position. | Joins: song.Singer_ID = singer.Singer_ID, | show distinct names of singers that have songs with sales more than 300000. |
singer | select distinct t1.name from singer as t1 join song as t2 on t1.singer_id = t2.singer_id where t2.sales > 300000 | Question: what are the different names of the singers that have sales more than 300000? | Tables: singer -> Singer_ID, Name, Birth_Year, Net_Worth_Millions, Citizenship. song -> Song_ID, Title, Singer_ID, Sales, Highest_Position. | Joins: song.Singer_ID = singer.Singer_ID, | what are the different names of the singers that have sales more than 300000? |
singer | 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 | Question: show the names of singers that have more than one song. | Tables: singer -> Singer_ID, Name, Birth_Year, Net_Worth_Millions, Citizenship. song -> Song_ID, Title, Singer_ID, Sales, Highest_Position. | Joins: song.Singer_ID = singer.Singer_ID, | show the names of singers that have more than one song. |
singer | 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 | Question: what are the names of the singers that have more than one songs? | Tables: singer -> Singer_ID, Name, Birth_Year, Net_Worth_Millions, Citizenship. song -> Song_ID, Title, Singer_ID, Sales, Highest_Position. | Joins: song.Singer_ID = singer.Singer_ID, | what are the names of the singers that have more than one songs? |
singer | 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 | Question: show the names of singers and the total sales of their songs. | Tables: singer -> Singer_ID, Name, Birth_Year, Net_Worth_Millions, Citizenship. song -> Song_ID, Title, Singer_ID, Sales, Highest_Position. | Joins: song.Singer_ID = singer.Singer_ID, | show the names of singers and the total sales of their songs. |
singer | 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 | Question: for each singer name, what is the total sales for their songs? | Tables: singer -> Singer_ID, Name, Birth_Year, Net_Worth_Millions, Citizenship. song -> Song_ID, Title, Singer_ID, Sales, Highest_Position. | Joins: song.Singer_ID = singer.Singer_ID, | for each singer name, what is the total sales for their songs? |
singer | select name from singer where singer_id not in (select singer_id from song) | Question: list the name of singers that do not have any song. | Tables: singer -> Singer_ID, Name, Birth_Year, Net_Worth_Millions, Citizenship. song -> Song_ID, Title, Singer_ID, Sales, Highest_Position. | Joins: song.Singer_ID = singer.Singer_ID, | list the name of singers that do not have any song. |
singer | select name from singer where singer_id not in (select singer_id from song) | Question: what is the sname of every sing that does not have any song? | Tables: singer -> Singer_ID, Name, Birth_Year, Net_Worth_Millions, Citizenship. song -> Song_ID, Title, Singer_ID, Sales, Highest_Position. | Joins: song.Singer_ID = singer.Singer_ID, | what is the sname of every sing that does not have any song? |
singer | select citizenship from singer where birth_year < 1945 intersect select citizenship from singer where birth_year > 1955 | Question: show the citizenship shared by singers with birth year before 1945 and after 1955. | Tables: singer -> Singer_ID, Name, Birth_Year, Net_Worth_Millions, Citizenship. song -> Song_ID, Title, Singer_ID, Sales, Highest_Position. | Joins: song.Singer_ID = singer.Singer_ID, | show the citizenship shared by singers with birth year before 1945 and after 1955. |
singer | select citizenship from singer where birth_year < 1945 intersect select citizenship from singer where birth_year > 1955 | Question: what are the citizenships that are shared by singers with a birth year before 1945 and after 1955? | Tables: singer -> Singer_ID, Name, Birth_Year, Net_Worth_Millions, Citizenship. song -> Song_ID, Title, Singer_ID, Sales, Highest_Position. | Joins: song.Singer_ID = singer.Singer_ID, | what are the citizenships that are shared by singers with a birth year before 1945 and after 1955? |
real_estate_properties | select count(*) from other_available_features | Question: how many available features are there in total? | Tables: Ref_Feature_Types -> feature_type_code, feature_type_name. Ref_Property_Types -> property_type_code, property_type_description. Other_Available_Features -> feature_id, feature_type_code, feature_name, feature_description. Properties -> property_id, pro... | how many available features are there in total? |
real_estate_properties | 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' | Question: what is the feature type name of feature aircon? | Tables: Ref_Feature_Types -> feature_type_code, feature_type_name. Ref_Property_Types -> property_type_code, property_type_description. Other_Available_Features -> feature_id, feature_type_code, feature_name, feature_description. Properties -> property_id, pr... | what is the feature type name of feature aircon? |
real_estate_properties | 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 | Question: show the property type descriptions of properties belonging to that code. | Tables: Ref_Feature_Types -> feature_type_code, feature_type_name. Ref_Property_Types -> property_type_code, property_type_description. Other_Available_Features -> feature_id, feature_type_code, feature_name, feature_description. Prop... | show the property type descriptions of properties belonging to that code. |
real_estate_properties | 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 | Question: what are the names of properties that are either houses or apartments with more than 1 room? | Tables: Ref_Feature_Types -> feature_type_code, feature_type_name. Ref_Property_Types -> property_type_code, property_type_description. Other_Available_Features -> feature_id, feature_type_code, feature_name, featur... | what are the names of properties that are either houses or apartments with more than 1 room? |
california_schools | select `free meal count (k-12)` / `enrollment (k-12)` from frpm where `county name` = 'alameda' order by (cast(`free meal count (k-12)` as real) / `enrollment (k-12)`) desc limit 1 | Question: what is the highest eligible free rate for k-12 students in the schools in alameda county? | Tables: frpm -> CDSCode, Academic Year, County Code, District Code, School Code, County Name, District Name, School Name, District Type, School Type, Educational Option Type, NSLP Provision Status, Charter School (Y/N... | what is the highest eligible free rate for k-12 students in the schools in alameda county? |
california_schools | select `free meal count (ages 5-17)` / `enrollment (ages 5-17)` from frpm where `educational option type` = 'continuation school' and `free meal count (ages 5-17)` / `enrollment (ages 5-17)` is not null order by `free meal count (ages 5-17)` / `enrollment (ages 5-17)` asc limit 3 | Question: please list the lowest three eligible free rates for students aged 5-17 in continuation schools. | Tables: frpm -> CDSCode, Academic Year, County Code, District Code, School Code, County Name, District Name, School Name, District Type, School Type, Educational Option Type, NSLP Provision Status, Charter Schoo... | please list the lowest three eligible free rates for students aged 5-17 in continuation schools. |
california_schools | select t2.zip from frpm as t1 inner join schools as t2 on t1.cdscode = t2.cdscode where t1.`district name` = 'fresno county office of education' and t1.`charter school (y/n)` = 1 | Question: please list the zip code of all the charter schools in fresno county office of education. | Tables: frpm -> CDSCode, Academic Year, County Code, District Code, School Code, County Name, District Name, School Name, District Type, School Type, Educational Option Type, NSLP Provision Status, Charter School (Y/N)... | please list the zip code of all the charter schools in fresno county office of education. |
california_schools | select t2.mailstreet from frpm as t1 inner join schools as t2 on t1.cdscode = t2.cdscode order by t1.`frpm count (k-12)` desc limit 1 | Question: what is the unabbreviated mailing address of the school with the highest frpm count for k-12 students? | Tables: frpm -> CDSCode, Academic Year, County Code, District Code, School Code, County Name, District Name, School Name, District Type, School Type, Educational Option Type, NSLP Provision Status, Charter... | what is the unabbreviated mailing address of the school with the highest frpm count for k-12 students? |
california_schools | select t2.phone from frpm as t1 inner join schools as t2 on t1.cdscode = t2.cdscode where t1.`charter funding type` = 'directly funded' and t1.`charter school (y/n)` = 1 and t2.opendate > '2000-01-01' | Question: please list the phone numbers of the direct charter-funded schools that are opened after 2000/1/1. | Tables: frpm -> CDSCode, Academic Year, County Code, District Code, School Code, County Name, District Name, School Name, District Type, School Type, Educational Option Type, NSLP Provision Status, Charter Sch... | please list the phone numbers of the direct charter-funded schools that are opened after 2000/1/1. |
california_schools | select count(distinct t2.school) from satscores as t1 inner join schools as t2 on t1.cds = t2.cdscode where t2.virtual = 'f' and t1.avgscrmath < 400 | Question: how many schools with an average score in math under 400 in the sat test are exclusively virtual? | Tables: frpm -> CDSCode, Academic Year, County Code, District Code, School Code, County Name, District Name, School Name, District Type, School Type, Educational Option Type, NSLP Provision Status, Charter Scho... | how many schools with an average score in math under 400 in the sat test are exclusively virtual? |
california_schools | select t2.school from satscores as t1 inner join schools as t2 on t1.cds = t2.cdscode where t2.magnet = 1 and t1.numtsttakr > 500 | Question: among the schools with the sat test takers of over 500, please list the schools that are magnet schools or offer a magnet program. | Tables: frpm -> CDSCode, Academic Year, County Code, District Code, School Code, County Name, District Name, School Name, District Type, School Type, Educational Option Type, NS... | among the schools with the sat test takers of over 500, please list the schools that are magnet schools or offer a magnet program. |
california_schools | select t2.phone from satscores as t1 inner join schools as t2 on t1.cds = t2.cdscode order by t1.numge1500 desc limit 1 | Question: what is the phone number of the school that has the highest number of test takers with an sat score of over 1500? | Tables: frpm -> CDSCode, Academic Year, County Code, District Code, School Code, County Name, District Name, School Name, District Type, School Type, Educational Option Type, NSLP Provision Stat... | what is the phone number of the school that has the highest number of test takers with an sat score of over 1500? |
california_schools | select numtsttakr from satscores where cds = ( select cdscode from frpm order by `frpm count (k-12)` desc limit 1 ) | Question: what is the number of sat test takers of the schools with the highest frpm count for k-12 students? | Tables: frpm -> CDSCode, Academic Year, County Code, District Code, School Code, County Name, District Name, School Name, District Type, School Type, Educational Option Type, NSLP Provision Status, Charter Sc... | what is the number of sat test takers of the schools with the highest frpm count for k-12 students? |
california_schools | select count(t2.`school code`) from satscores as t1 inner join frpm as t2 on t1.cds = t2.cdscode where t1.avgscrmath > 560 and t2.`charter funding type` = 'directly funded' | Question: among the schools with the average score in math over 560 in the sat test, how many schools are directly charter-funded? | Tables: frpm -> CDSCode, Academic Year, County Code, District Code, School Code, County Name, District Name, School Name, District Type, School Type, Educational Option Type, NSLP Provisi... | among the schools with the average score in math over 560 in the sat test, how many schools are directly charter-funded? |
california_schools | select t2.`frpm count (ages 5-17)` from satscores as t1 inner join frpm as t2 on t1.cds = t2.cdscode order by t1.avgscrread desc limit 1 | Question: for the school with the highest average score in reading in the sat test, what is its frpm count for students aged 5-17? | Tables: frpm -> CDSCode, Academic Year, County Code, District Code, School Code, County Name, District Name, School Name, District Type, School Type, Educational Option Type, NSLP Provisi... | for the school with the highest average score in reading in the sat test, what is its frpm count for students aged 5-17? |
california_schools | select t2.cdscode from schools as t1 inner join frpm as t2 on t1.cdscode = t2.cdscode where t2.`enrollment (k-12)` + t2.`enrollment (ages 5-17)` > 500 | Question: please list the codes of the schools with a total enrollment of over 500. | Tables: frpm -> CDSCode, Academic Year, County Code, District Code, School Code, County Name, District Name, School Name, District Type, School Type, Educational Option Type, NSLP Provision Status, Charter School (Y/N), Charter School... | please list the codes of the schools with a total enrollment of over 500. |
california_schools | select max(cast(t1.`free meal count (ages 5-17)` as real) / t1.`enrollment (ages 5-17)`) from frpm as t1 inner join satscores as t2 on t1.cdscode = t2.cds where cast(t2.numge1500 as real) / t2.numtsttakr > 0.3 | Question: among the schools with an sat excellence rate of over 0.3, what is the highest eligible free rate for students aged 5-17? | Tables: frpm -> CDSCode, Academic Year, County Code, District Code, School Code, County Name, District Name, School Name, District Type, School Type, Educational Option Type, NSLP Provis... | among the schools with an sat excellence rate of over 0.3, what is the highest eligible free rate for students aged 5-17? |
california_schools | select t1.phone from schools as t1 inner join satscores as t2 on t1.cdscode = t2.cds order by cast(t2.numge1500 as real) / t2.numtsttakr desc limit 3 | Question: please list the phone numbers of the schools with the top 3 sat excellence rate. | Tables: frpm -> CDSCode, Academic Year, County Code, District Code, School Code, County Name, District Name, School Name, District Type, School Type, Educational Option Type, NSLP Provision Status, Charter School (Y/N), Charter... | please list the phone numbers of the schools with the top 3 sat excellence rate. |
california_schools | select t1.ncesschool from schools as t1 inner join frpm as t2 on t1.cdscode = t2.cdscode order by t2.`enrollment (ages 5-17)` desc limit 5 | Question: list the top five schools, by descending order, from the highest to the lowest, the most number of enrollment (ages 5-17). please give their nces school identification number. | Tables: frpm -> CDSCode, Academic Year, County Code, District Code, School Code, County Name, District Name, School Name, District T... | list the top five schools, by descending order, from the highest to the lowest, the most number of enrollment (ages 5-17). please give their nces school identification number. |
california_schools | select t1.district from schools as t1 inner join satscores as t2 on t1.cdscode = t2.cds where t1.statustype = 'active' order by t2.avgscrread desc limit 1 | Question: which active district has the highest average score in reading? | Tables: frpm -> CDSCode, Academic Year, County Code, District Code, School Code, County Name, District Name, School Name, District Type, School Type, Educational Option Type, NSLP Provision Status, Charter School (Y/N), Charter School Number, C... | which active district has the highest average score in reading? |
california_schools | select count(t1.cdscode) from schools as t1 inner join satscores as t2 on t1.cdscode = t2.cds where t1.statustype = 'merged' and t2.numtsttakr < 100 and t1.county = 'alameda' | Question: how many schools in merged alameda have number of test takers less than 100? | Tables: frpm -> CDSCode, Academic Year, County Code, District Code, School Code, County Name, District Name, School Name, District Type, School Type, Educational Option Type, NSLP Provision Status, Charter School (Y/N), Charter Sch... | how many schools in merged alameda have number of test takers less than 100? |
california_schools | select t1.charternum from schools as t1 inner join satscores as t2 on t1.cdscode = t2.cds where t2.avgscrwrite = 499 | Question: what is the charter number of the school that the average score in writing is 499? | Tables: frpm -> CDSCode, Academic Year, County Code, District Code, School Code, County Name, District Name, School Name, District Type, School Type, Educational Option Type, NSLP Provision Status, Charter School (Y/N), Chart... | what is the charter number of the school that the average score in writing is 499? |
california_schools | select count(t1.cdscode) from frpm as t1 inner join satscores as t2 on t1.cdscode = t2.cds where t1.`charter funding type` = 'directly funded' and t1.`county name` = 'contra costa' and t2.numtsttakr <= 250 | Question: how many schools in contra costa (directly funded) have number of test takers not more than 250? | Tables: frpm -> CDSCode, Academic Year, County Code, District Code, School Code, County Name, District Name, School Name, District Type, School Type, Educational Option Type, NSLP Provision Status, Charter Schoo... | how many schools in contra costa (directly funded) have number of test takers not more than 250? |
california_schools | select t1.phone from schools as t1 inner join satscores as t2 on t1.cdscode = t2.cds order by t2.avgscrmath desc limit 1 | Question: what is the phone number of the school that has the highest average score in math? | Tables: frpm -> CDSCode, Academic Year, County Code, District Code, School Code, County Name, District Name, School Name, District Type, School Type, Educational Option Type, NSLP Provision Status, Charter School (Y/N), Chart... | what is the phone number of the school that has the highest average score in math? |
california_schools | select count(t1.`school name`) from frpm as t1 inner join schools as t2 on t1.cdscode = t2.cdscode where t2.county = 'amador' and t1.`low grade` = 9 and t1.`high grade` = 12 | Question: how many schools in amador which the low grade is 9 and the high grade is 12? | Tables: frpm -> CDSCode, Academic Year, County Code, District Code, School Code, County Name, District Name, School Name, District Type, School Type, Educational Option Type, NSLP Provision Status, Charter School (Y/N), Charter Sc... | how many schools in amador which the low grade is 9 and the high grade is 12? |
california_schools | select count(cdscode) from frpm where `county name` = 'los angeles' and `free meal count (k-12)` > 500 and `free meal count (k-12)` < 700 | Question: in los angeles how many schools have more than 500 free meals but less than 700 free or reduced price meals for k-12? | Tables: frpm -> CDSCode, Academic Year, County Code, District Code, School Code, County Name, District Name, School Name, District Type, School Type, Educational Option Type, NSLP Provision ... | in los angeles how many schools have more than 500 free meals but less than 700 free or reduced price meals for k-12? |
california_schools | select sname from satscores where cname = 'contra costa' and sname is not null order by numtsttakr desc limit 1 | Question: which school in contra costa has the highest number of test takers? | Tables: frpm -> CDSCode, Academic Year, County Code, District Code, School Code, County Name, District Name, School Name, District Type, School Type, Educational Option Type, NSLP Provision Status, Charter School (Y/N), Charter School Numbe... | which school in contra costa has the highest number of test takers? |
california_schools | select t1.school, t1.streetabr from schools as t1 inner join frpm as t2 on t1.cdscode = t2.cdscode where t2.`enrollment (k-12)` - t2.`enrollment (ages 5-17)` > 30 | Question: list the names of schools with more than 30 difference in enrollements between k-12 and ages 5-17? please also give the full street adress of the schools. | Tables: frpm -> CDSCode, Academic Year, County Code, District Code, School Code, County Name, District Name, School Name, District Type, School Type, Edu... | list the names of schools with more than 30 difference in enrollements between k-12 and ages 5-17? please also give the full street adress of the schools. |
california_schools | select t2.`school name` from satscores as t1 inner join frpm as t2 on t1.cds = t2.cdscode where cast(t2.`free meal count (k-12)` as real) / t2.`enrollment (k-12)` > 0.1 and t1.numge1500 > 0 | Question: give the names of the schools with the percent eligible for free meals in k-12 is more than 0.1 and test takers whose test score is greater than or equal to 1500? | Tables: frpm -> CDSCode, Academic Year, County Code, District Code, School Code, County Name, District Name, School Name, District Type, School T... | give the names of the schools with the percent eligible for free meals in k-12 is more than 0.1 and test takers whose test score is greater than or equal to 1500? |
california_schools | select t1.sname, t2.`charter funding type` from satscores as t1 inner join frpm as t2 on t1.cds = t2.cdscode where t2.`district name` like 'riverside%' group by t1.sname, t2.`charter funding type` having cast(sum(t1.avgscrmath) as real) / count(t1.cds) > 400 | Question: name schools in riverside which the average of average math score for sat is grater than 400, what is the funding type of these schools? | Tables: frpm -> CDSCode, Academic Year, County Code, District Code, School Code, County Name, District Name, School Name, District Type, School Type, Educational Option Ty... | name schools in riverside which the average of average math score for sat is grater than 400, what is the funding type of these schools? |
california_schools | select t1.`school name`, t2.zip, t2.street, t2.city, t2.state from frpm as t1 inner join schools as t2 on t1.cdscode = t2.cdscode where t2.county = 'monterey' and t1.`free meal count (ages 5-17)` > 800 and t1.`school type` = 'high schools (public)' | Question: state the names and full communication address of high schools in monterey which has more than 800 free or reduced price meals for ages 15-17? | Tables: frpm -> CDSCode, Academic Year, County Code, District Code, School Code, County Name, District Name, School Name, District Type, School Type, Educational Opt... | state the names and full communication address of high schools in monterey which has more than 800 free or reduced price meals for ages 15-17? |
california_schools | select t2.school, t1.avgscrwrite, t2.phone, strftime('%y', t2.opendate), strftime('%y', t2.closeddate) from schools as t2 left join satscores as t1 on t2.cdscode = t1.cds where strftime('%y', t2.opendate) > '1991' and strftime('%y', t2.closeddate) < '2000' | Question: what is the average score in writing for the schools that were opened after 1991 or closed before 2000? list the school names along with the score. also, list the communication number of the schools if there is any. | Tables: frpm -> CDSCode, Academic Year, County Code, District Code, School Code, County Name... | what is the average score in writing for the schools that were opened after 1991 or closed before 2000? list the school names along with the score. also, list the communication number of the schools if there is any. |
california_schools | select t2.school, t2.doc from frpm as t1 inner join schools as t2 on t1.cdscode = t2.cdscode where t2.fundingtype = 'locally funded' and (t1.`enrollment (k-12)` - t1.`enrollment (ages 5-17)`) > (select avg(t3.`enrollment (k-12)` - t3.`enrollment (ages 5-17)`) from frpm as t3 inner join schools as t4 on t3.cdscode = t4.... | Question: consider the average difference between k-12 enrollment and 15-17 enrollment of schools that are locally funded, list the names and doc type of schools which has a difference above this average. | Tables: frpm -> CDSCode, Academic Year, County Code, District Code, School Code, County Name, District Name, Scho... | consider the average difference between k-12 enrollment and 15-17 enrollment of schools that are locally funded, list the names and doc type of schools which has a difference above this average. |
california_schools | select t2.opendate from frpm as t1 inner join schools as t2 on t1.cdscode = t2.cdscode order by t1.`enrollment (k-12)` desc limit 1 | Question: when did the first-through-twelfth-grade school with the largest enrollment open? | Tables: frpm -> CDSCode, Academic Year, County Code, District Code, School Code, County Name, District Name, School Name, District Type, School Type, Educational Option Type, NSLP Provision Status, Charter School (Y/N), Charte... | when did the first-through-twelfth-grade school with the largest enrollment open? |
california_schools | select t2.city from frpm as t1 inner join schools as t2 on t1.cdscode = t2.cdscode group by t2.city order by sum(t1.`enrollment (k-12)`) asc limit 5 | Question: which cities have the top 5 lowest enrollment number for students in grades 1 through 12? | Tables: frpm -> CDSCode, Academic Year, County Code, District Code, School Code, County Name, District Name, School Name, District Type, School Type, Educational Option Type, NSLP Provision Status, Charter School (Y/N)... | which cities have the top 5 lowest enrollment number for students in grades 1 through 12? |
california_schools | select cast(`free meal count (k-12)` as real) / `enrollment (k-12)` from frpm order by `enrollment (k-12)` desc limit 9, 2 | Question: what is the eligible free rate of the 10th and 11th schools with the highest enrolment for students in grades 1 through 12? | Tables: frpm -> CDSCode, Academic Year, County Code, District Code, School Code, County Name, District Name, School Name, District Type, School Type, Educational Option Type, NSLP Prov... | what is the eligible free rate of the 10th and 11th schools with the highest enrolment for students in grades 1 through 12? |
california_schools | select cast(t1.`frpm count (k-12)` as real) / t1.`enrollment (k-12)` from frpm as t1 inner join schools as t2 on t1.cdscode = t2.cdscode where t2.soc = 66 order by t1.`frpm count (k-12)` desc limit 5 | Question: what is the eligible free or reduced price meal rate for the top 5 schools in grades 1-12 with the highest free or reduced price meal count of the schools with the ownership code 66? | Tables: frpm -> CDSCode, Academic Year, County Code, District Code, School Code, County Name, District Name, School Name, Dis... | what is the eligible free or reduced price meal rate for the top 5 schools in grades 1-12 with the highest free or reduced price meal count of the schools with the ownership code 66? |
california_schools | select t2.website, t1.`school name` from frpm as t1 inner join schools as t2 on t1.cdscode = t2.cdscode where t1.`free meal count (ages 5-17)` between 1900 and 2000 and t2.website is not null | Question: if there are any, what are the websites address of the schools with a free meal count of 1,900-2,000 to students aged 5-17? include the name of the school. | Tables: frpm -> CDSCode, Academic Year, County Code, District Code, School Code, County Name, District Name, School Name, District Type, School Type, Ed... | if there are any, what are the websites address of the schools with a free meal count of 1,900-2,000 to students aged 5-17? include the name of the school. |
california_schools | select cast(t2.`free meal count (ages 5-17)` as real) / t2.`enrollment (ages 5-17)` from schools as t1 inner join frpm as t2 on t1.cdscode = t2.cdscode where t1.admfname1 = 'kacey' and t1.admlname1 = 'gibson' | Question: what is the free rate for students between the ages of 5 and 17 at the school run by kacey gibson? | Tables: frpm -> CDSCode, Academic Year, County Code, District Code, School Code, County Name, District Name, School Name, District Type, School Type, Educational Option Type, NSLP Provision Status, Charter Sch... | what is the free rate for students between the ages of 5 and 17 at the school run by kacey gibson? |
california_schools | select t2.admemail1 from frpm as t1 inner join schools as t2 on t1.cdscode = t2.cdscode where t1.`charter school (y/n)` = 1 order by t1.`enrollment (k-12)` asc limit 1 | Question: what is the administrator's email address of the chartered school with the fewest students enrolled in grades 1 through 12? | Tables: frpm -> CDSCode, Academic Year, County Code, District Code, School Code, County Name, District Name, School Name, District Type, School Type, Educational Option Type, NSLP Prov... | what is the administrator's email address of the chartered school with the fewest students enrolled in grades 1 through 12? |
california_schools | select t2.admfname1, t2.admlname1, t2.admfname2, t2.admlname2, t2.admfname3, t2.admlname3 from satscores as t1 inner join schools as t2 on t1.cds = t2.cdscode order by t1.numge1500 desc limit 1 | Question: under whose administration does the school with the highest number of test takers whose total sat scores are greater or equal to 1500 belong to? indicate his or her full name. | Tables: frpm -> CDSCode, Academic Year, County Code, District Code, School Code, County Name, District Name, School Name, District T... | under whose administration does the school with the highest number of test takers whose total sat scores are greater or equal to 1500 belong to? indicate his or her full name. |
california_schools | select t2.street, t2.city, t2.zip, t2.state from satscores as t1 inner join schools as t2 on t1.cds = t2.cdscode order by cast(t1.numge1500 as real) / t1.numtsttakr asc limit 1 | Question: what is the complete address of the school with the lowest excellence rate? indicate the street, city, zip and state. | Tables: frpm -> CDSCode, Academic Year, County Code, District Code, School Code, County Name, District Name, School Name, District Type, School Type, Educational Option Type, NSLP Provision ... | what is the complete address of the school with the lowest excellence rate? indicate the street, city, zip and state. |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.