db_id
stringlengths
4
31
text
stringlengths
370
4.84k
bike_1
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: What are the dates that have an average sea level pressure between 30.3 and 31? | station : id , name , lat , long , dock_count , city , installation_date | status : station_id , bikes_available , docks_available , time | trip : id , duration , start_date , start_station_name , start_station_id , end_date , end_station_name , end_station_id , bike_id , subscription_type , zip_code | weather : date , max_temperature_f , mean_temperature_f , min_temperature_f , max_dew_point_f , mean_dew_point_f , min_dew_point_f , max_humidity , mean_humidity , min_humidity , max_sea_level_pressure_inches , mean_sea_level_pressure_inches , min_sea_level_pressure_inches , max_visibility_miles , mean_visibility_miles , min_visibility_miles , max_wind_speed_mph , mean_wind_speed_mph , max_gust_speed_mph , precipitation_inches , cloud_cover , events , wind_dir_degrees , zip_code | status.station_id = station.id | ### Response: select date from weather where mean_sea_level_pressure_inches between 30.3 and 31
bike_1
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: Find the day in which the difference between the max temperature and min temperature was the smallest. Also report the difference. | station : id , name , lat , long , dock_count , city , installation_date | status : station_id , bikes_available , docks_available , time | trip : id , duration , start_date , start_station_name , start_station_id , end_date , end_station_name , end_station_id , bike_id , subscription_type , zip_code | weather : date , max_temperature_f , mean_temperature_f , min_temperature_f , max_dew_point_f , mean_dew_point_f , min_dew_point_f , max_humidity , mean_humidity , min_humidity , max_sea_level_pressure_inches , mean_sea_level_pressure_inches , min_sea_level_pressure_inches , max_visibility_miles , mean_visibility_miles , min_visibility_miles , max_wind_speed_mph , mean_wind_speed_mph , max_gust_speed_mph , precipitation_inches , cloud_cover , events , wind_dir_degrees , zip_code | status.station_id = station.id | ### Response: select date , max_temperature_f - min_temperature_f from weather order by max_temperature_f - min_temperature_f asc limit 1
bike_1
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: What are the days that had the smallest temperature range, and what was that range? | station : id , name , lat , long , dock_count , city , installation_date | status : station_id , bikes_available , docks_available , time | trip : id , duration , start_date , start_station_name , start_station_id , end_date , end_station_name , end_station_id , bike_id , subscription_type , zip_code | weather : date , max_temperature_f , mean_temperature_f , min_temperature_f , max_dew_point_f , mean_dew_point_f , min_dew_point_f , max_humidity , mean_humidity , min_humidity , max_sea_level_pressure_inches , mean_sea_level_pressure_inches , min_sea_level_pressure_inches , max_visibility_miles , mean_visibility_miles , min_visibility_miles , max_wind_speed_mph , mean_wind_speed_mph , max_gust_speed_mph , precipitation_inches , cloud_cover , events , wind_dir_degrees , zip_code | status.station_id = station.id | ### Response: select date , max_temperature_f - min_temperature_f from weather order by max_temperature_f - min_temperature_f asc limit 1
bike_1
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: What are the id and name of the stations that have ever had more than 12 bikes available? | station : id , name , lat , long , dock_count , city , installation_date | status : station_id , bikes_available , docks_available , time | trip : id , duration , start_date , start_station_name , start_station_id , end_date , end_station_name , end_station_id , bike_id , subscription_type , zip_code | weather : date , max_temperature_f , mean_temperature_f , min_temperature_f , max_dew_point_f , mean_dew_point_f , min_dew_point_f , max_humidity , mean_humidity , min_humidity , max_sea_level_pressure_inches , mean_sea_level_pressure_inches , min_sea_level_pressure_inches , max_visibility_miles , mean_visibility_miles , min_visibility_miles , max_wind_speed_mph , mean_wind_speed_mph , max_gust_speed_mph , precipitation_inches , cloud_cover , events , wind_dir_degrees , zip_code | status.station_id = station.id | ### Response: select distinct station.id , station.name from station join status on station.id = status.station_id where status.bikes_available > 12
bike_1
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: What are the different ids and names of the stations that have had more than 12 bikes available? | station : id , name , lat , long , dock_count , city , installation_date | status : station_id , bikes_available , docks_available , time | trip : id , duration , start_date , start_station_name , start_station_id , end_date , end_station_name , end_station_id , bike_id , subscription_type , zip_code | weather : date , max_temperature_f , mean_temperature_f , min_temperature_f , max_dew_point_f , mean_dew_point_f , min_dew_point_f , max_humidity , mean_humidity , min_humidity , max_sea_level_pressure_inches , mean_sea_level_pressure_inches , min_sea_level_pressure_inches , max_visibility_miles , mean_visibility_miles , min_visibility_miles , max_wind_speed_mph , mean_wind_speed_mph , max_gust_speed_mph , precipitation_inches , cloud_cover , events , wind_dir_degrees , zip_code | status.station_id = station.id | ### Response: select distinct station.id , station.name from station join status on station.id = status.station_id where status.bikes_available > 12
bike_1
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: Give me the zip code where the average mean humidity is below 70 and at least 100 trips took place. | station : id , name , lat , long , dock_count , city , installation_date | status : station_id , bikes_available , docks_available , time | trip : id , duration , start_date , start_station_name , start_station_id , end_date , end_station_name , end_station_id , bike_id , subscription_type , zip_code | weather : date , max_temperature_f , mean_temperature_f , min_temperature_f , max_dew_point_f , mean_dew_point_f , min_dew_point_f , max_humidity , mean_humidity , min_humidity , max_sea_level_pressure_inches , mean_sea_level_pressure_inches , min_sea_level_pressure_inches , max_visibility_miles , mean_visibility_miles , min_visibility_miles , max_wind_speed_mph , mean_wind_speed_mph , max_gust_speed_mph , precipitation_inches , cloud_cover , events , wind_dir_degrees , zip_code | status.station_id = station.id | ### Response: select zip_code from weather group by zip_code having avg ( mean_humidity ) < 70 intersect select zip_code from trip group by zip_code having count ( * ) >= 100
bike_1
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: What are the zip codes that have an average mean humidity below 70 and had at least 100 trips come through there? | station : id , name , lat , long , dock_count , city , installation_date | status : station_id , bikes_available , docks_available , time | trip : id , duration , start_date , start_station_name , start_station_id , end_date , end_station_name , end_station_id , bike_id , subscription_type , zip_code | weather : date , max_temperature_f , mean_temperature_f , min_temperature_f , max_dew_point_f , mean_dew_point_f , min_dew_point_f , max_humidity , mean_humidity , min_humidity , max_sea_level_pressure_inches , mean_sea_level_pressure_inches , min_sea_level_pressure_inches , max_visibility_miles , mean_visibility_miles , min_visibility_miles , max_wind_speed_mph , mean_wind_speed_mph , max_gust_speed_mph , precipitation_inches , cloud_cover , events , wind_dir_degrees , zip_code | status.station_id = station.id | ### Response: select zip_code from weather group by zip_code having avg ( mean_humidity ) < 70 intersect select zip_code from trip group by zip_code having count ( * ) >= 100
bike_1
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: What are the names of stations that are located in Palo Alto city but have never been the ending point of trips more than 100 times? | station : id , name , lat , long , dock_count , city , installation_date | status : station_id , bikes_available , docks_available , time | trip : id , duration , start_date , start_station_name , start_station_id , end_date , end_station_name , end_station_id , bike_id , subscription_type , zip_code | weather : date , max_temperature_f , mean_temperature_f , min_temperature_f , max_dew_point_f , mean_dew_point_f , min_dew_point_f , max_humidity , mean_humidity , min_humidity , max_sea_level_pressure_inches , mean_sea_level_pressure_inches , min_sea_level_pressure_inches , max_visibility_miles , mean_visibility_miles , min_visibility_miles , max_wind_speed_mph , mean_wind_speed_mph , max_gust_speed_mph , precipitation_inches , cloud_cover , events , wind_dir_degrees , zip_code | status.station_id = station.id | ### Response: select name from station where city = 'Palo Alto' except select end_station_name from trip group by end_station_name having count ( * ) > 100
bike_1
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: What are the names of the stations that are located in Palo Alto but have never been the ending point of the trips | station : id , name , lat , long , dock_count , city , installation_date | status : station_id , bikes_available , docks_available , time | trip : id , duration , start_date , start_station_name , start_station_id , end_date , end_station_name , end_station_id , bike_id , subscription_type , zip_code | weather : date , max_temperature_f , mean_temperature_f , min_temperature_f , max_dew_point_f , mean_dew_point_f , min_dew_point_f , max_humidity , mean_humidity , min_humidity , max_sea_level_pressure_inches , mean_sea_level_pressure_inches , min_sea_level_pressure_inches , max_visibility_miles , mean_visibility_miles , min_visibility_miles , max_wind_speed_mph , mean_wind_speed_mph , max_gust_speed_mph , precipitation_inches , cloud_cover , events , wind_dir_degrees , zip_code | status.station_id = station.id | ### Response: select name from station where city = 'Palo Alto' except select end_station_name from trip group by end_station_name having count ( * ) > 100
bike_1
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: How many trips started from Mountain View city and ended at Palo Alto city? | station : id , name , lat , long , dock_count , city , installation_date | status : station_id , bikes_available , docks_available , time | trip : id , duration , start_date , start_station_name , start_station_id , end_date , end_station_name , end_station_id , bike_id , subscription_type , zip_code | weather : date , max_temperature_f , mean_temperature_f , min_temperature_f , max_dew_point_f , mean_dew_point_f , min_dew_point_f , max_humidity , mean_humidity , min_humidity , max_sea_level_pressure_inches , mean_sea_level_pressure_inches , min_sea_level_pressure_inches , max_visibility_miles , mean_visibility_miles , min_visibility_miles , max_wind_speed_mph , mean_wind_speed_mph , max_gust_speed_mph , precipitation_inches , cloud_cover , events , wind_dir_degrees , zip_code | status.station_id = station.id | ### Response: select count ( * ) from station join trip join station join trip on station.id = trip.start_station_id and trip.id = trip.id and station.id = trip.end_station_id where station.city = 'Mountain View' and station.city = 'Palo Alto'
bike_1
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: How many trips stated from a station in Mountain View and ended at one in Palo Alto? | station : id , name , lat , long , dock_count , city , installation_date | status : station_id , bikes_available , docks_available , time | trip : id , duration , start_date , start_station_name , start_station_id , end_date , end_station_name , end_station_id , bike_id , subscription_type , zip_code | weather : date , max_temperature_f , mean_temperature_f , min_temperature_f , max_dew_point_f , mean_dew_point_f , min_dew_point_f , max_humidity , mean_humidity , min_humidity , max_sea_level_pressure_inches , mean_sea_level_pressure_inches , min_sea_level_pressure_inches , max_visibility_miles , mean_visibility_miles , min_visibility_miles , max_wind_speed_mph , mean_wind_speed_mph , max_gust_speed_mph , precipitation_inches , cloud_cover , events , wind_dir_degrees , zip_code | status.station_id = station.id | ### Response: select count ( * ) from station join trip join station join trip on station.id = trip.start_station_id and trip.id = trip.id and station.id = trip.end_station_id where station.city = 'Mountain View' and station.city = 'Palo Alto'
bike_1
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: What is the average latitude and longitude of the starting points of all trips? | station : id , name , lat , long , dock_count , city , installation_date | status : station_id , bikes_available , docks_available , time | trip : id , duration , start_date , start_station_name , start_station_id , end_date , end_station_name , end_station_id , bike_id , subscription_type , zip_code | weather : date , max_temperature_f , mean_temperature_f , min_temperature_f , max_dew_point_f , mean_dew_point_f , min_dew_point_f , max_humidity , mean_humidity , min_humidity , max_sea_level_pressure_inches , mean_sea_level_pressure_inches , min_sea_level_pressure_inches , max_visibility_miles , mean_visibility_miles , min_visibility_miles , max_wind_speed_mph , mean_wind_speed_mph , max_gust_speed_mph , precipitation_inches , cloud_cover , events , wind_dir_degrees , zip_code | status.station_id = station.id | ### Response: select avg ( station.lat ) , avg ( station.long ) from station join trip on station.id = trip.start_station_id
bike_1
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: What is the average latitude and longitude of all starting stations for the trips? | station : id , name , lat , long , dock_count , city , installation_date | status : station_id , bikes_available , docks_available , time | trip : id , duration , start_date , start_station_name , start_station_id , end_date , end_station_name , end_station_id , bike_id , subscription_type , zip_code | weather : date , max_temperature_f , mean_temperature_f , min_temperature_f , max_dew_point_f , mean_dew_point_f , min_dew_point_f , max_humidity , mean_humidity , min_humidity , max_sea_level_pressure_inches , mean_sea_level_pressure_inches , min_sea_level_pressure_inches , max_visibility_miles , mean_visibility_miles , min_visibility_miles , max_wind_speed_mph , mean_wind_speed_mph , max_gust_speed_mph , precipitation_inches , cloud_cover , events , wind_dir_degrees , zip_code | status.station_id = station.id | ### Response: select avg ( station.lat ) , avg ( station.long ) from station join trip on station.id = trip.start_station_id
book_2
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: How many books are there? | publication : publication_id , book_id , publisher , publication_date , price | book : book_id , title , issues , writer | publication.book_id = book.book_id | ### Response: select count ( * ) from book
book_2
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: List the writers of the books in ascending alphabetical order. | publication : publication_id , book_id , publisher , publication_date , price | book : book_id , title , issues , writer | publication.book_id = book.book_id | ### Response: select writer from book order by writer asc
book_2
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: List the titles of the books in ascending order of issues. | publication : publication_id , book_id , publisher , publication_date , price | book : book_id , title , issues , writer | publication.book_id = book.book_id | ### Response: select title from book order by issues asc
book_2
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: What are the titles of the books whose writer is not "Elaine Lee"? | publication : publication_id , book_id , publisher , publication_date , price | book : book_id , title , issues , writer | publication.book_id = book.book_id | ### Response: select title from book where writer != 'Elaine Lee'
book_2
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: What are the title and issues of the books? | publication : publication_id , book_id , publisher , publication_date , price | book : book_id , title , issues , writer | publication.book_id = book.book_id | ### Response: select title , issues from book
book_2
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: What are the dates of publications in descending order of price? | publication : publication_id , book_id , publisher , publication_date , price | book : book_id , title , issues , writer | publication.book_id = book.book_id | ### Response: select publication_date from publication order by price desc
book_2
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: What are the distinct publishers of publications with price higher than 5000000? | publication : publication_id , book_id , publisher , publication_date , price | book : book_id , title , issues , writer | publication.book_id = book.book_id | ### Response: select distinct publisher from publication where price > 5000000
book_2
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: List the publisher of the publication with the highest price. | publication : publication_id , book_id , publisher , publication_date , price | book : book_id , title , issues , writer | publication.book_id = book.book_id | ### Response: select publisher from publication order by price desc limit 1
book_2
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: List the publication dates of publications with 3 lowest prices. | publication : publication_id , book_id , publisher , publication_date , price | book : book_id , title , issues , writer | publication.book_id = book.book_id | ### Response: select publication_date from publication order by price asc limit 3
book_2
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: Show the title and publication dates of books. | publication : publication_id , book_id , publisher , publication_date , price | book : book_id , title , issues , writer | publication.book_id = book.book_id | ### Response: select book.title , publication.publication_date from book join publication on book.book_id = publication.book_id
book_2
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: Show writers who have published a book with price more than 4000000. | publication : publication_id , book_id , publisher , publication_date , price | book : book_id , title , issues , writer | publication.book_id = book.book_id | ### Response: select book.writer from book join publication on book.book_id = publication.book_id where publication.price > 4000000
book_2
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: Show the titles of books in descending order of publication price. | publication : publication_id , book_id , publisher , publication_date , price | book : book_id , title , issues , writer | publication.book_id = book.book_id | ### Response: select book.title from book join publication on book.book_id = publication.book_id order by publication.price desc
book_2
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: Show publishers that have more than one publication. | publication : publication_id , book_id , publisher , publication_date , price | book : book_id , title , issues , writer | publication.book_id = book.book_id | ### Response: select publisher from publication group by publisher having count ( * ) > 1
book_2
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: Show different publishers together with the number of publications they have. | publication : publication_id , book_id , publisher , publication_date , price | book : book_id , title , issues , writer | publication.book_id = book.book_id | ### Response: select publisher , count ( * ) from publication group by publisher
book_2
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: Please show the most common publication date. | publication : publication_id , book_id , publisher , publication_date , price | book : book_id , title , issues , writer | publication.book_id = book.book_id | ### Response: select publication_date from publication group by publication_date order by count ( * ) desc limit 1
book_2
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: List the writers who have written more than one book. | publication : publication_id , book_id , publisher , publication_date , price | book : book_id , title , issues , writer | publication.book_id = book.book_id | ### Response: select writer from book group by writer having count ( * ) > 1
book_2
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: List the titles of books that are not published. | publication : publication_id , book_id , publisher , publication_date , price | book : book_id , title , issues , writer | publication.book_id = book.book_id | ### Response: select title from book where book_id not in ( select book_id from publication )
book_2
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: Show the publishers that have publications with price higher than 10000000 and publications with price lower than 5000000. | publication : publication_id , book_id , publisher , publication_date , price | book : book_id , title , issues , writer | publication.book_id = book.book_id | ### Response: select publisher from publication where price > 10000000 intersect select publisher from publication where price < 5000000
book_2
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: What is the number of distinct publication dates? | publication : publication_id , book_id , publisher , publication_date , price | book : book_id , title , issues , writer | publication.book_id = book.book_id | ### Response: select count ( distinct publication_date ) from publication
book_2
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: How many distinct publication dates are there in our record? | publication : publication_id , book_id , publisher , publication_date , price | book : book_id , title , issues , writer | publication.book_id = book.book_id | ### Response: select count ( distinct publication_date ) from publication
book_2
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: Show the prices of publications whose publisher is either "Person" or "Wiley" | publication : publication_id , book_id , publisher , publication_date , price | book : book_id , title , issues , writer | publication.book_id = book.book_id | ### Response: select price from publication where publisher = 'Person' or publisher = 'Wiley'
musical
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: How many actors are there? | musical : musical_id , name , year , award , category , nominee , result | actor : actor_id , name , musical_id , character , duration , age | actor.musical_id = actor.actor_id | ### Response: select count ( * ) from actor
musical
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: Count the number of actors. | musical : musical_id , name , year , award , category , nominee , result | actor : actor_id , name , musical_id , character , duration , age | actor.musical_id = actor.actor_id | ### Response: select count ( * ) from actor
musical
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: List the name of actors in ascending alphabetical order. | musical : musical_id , name , year , award , category , nominee , result | actor : actor_id , name , musical_id , character , duration , age | actor.musical_id = actor.actor_id | ### Response: select name from actor order by name asc
musical
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: What are the names of actors, ordered alphabetically? | musical : musical_id , name , year , award , category , nominee , result | actor : actor_id , name , musical_id , character , duration , age | actor.musical_id = actor.actor_id | ### Response: select name from actor order by name asc
musical
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: What are the characters and duration of actors? | musical : musical_id , name , year , award , category , nominee , result | actor : actor_id , name , musical_id , character , duration , age | actor.musical_id = actor.actor_id | ### Response: select character , duration from actor
musical
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: Return the characters and durations for each actor. | musical : musical_id , name , year , award , category , nominee , result | actor : actor_id , name , musical_id , character , duration , age | actor.musical_id = actor.actor_id | ### Response: select character , duration from actor
musical
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: List the name of actors whose age is not 20. | musical : musical_id , name , year , award , category , nominee , result | actor : actor_id , name , musical_id , character , duration , age | actor.musical_id = actor.actor_id | ### Response: select name from actor where age != 20
musical
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: What are the names of actors who are not 20 years old? | musical : musical_id , name , year , award , category , nominee , result | actor : actor_id , name , musical_id , character , duration , age | actor.musical_id = actor.actor_id | ### Response: select name from actor where age != 20
musical
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: What are the characters of actors in descending order of age? | musical : musical_id , name , year , award , category , nominee , result | actor : actor_id , name , musical_id , character , duration , age | actor.musical_id = actor.actor_id | ### Response: select character from actor order by age desc
musical
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: Return the characters for actors, ordered by age descending. | musical : musical_id , name , year , award , category , nominee , result | actor : actor_id , name , musical_id , character , duration , age | actor.musical_id = actor.actor_id | ### Response: select character from actor order by age desc
musical
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: What is the duration of the oldest actor? | musical : musical_id , name , year , award , category , nominee , result | actor : actor_id , name , musical_id , character , duration , age | actor.musical_id = actor.actor_id | ### Response: select duration from actor order by age desc limit 1
musical
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: Return the duration of the actor with the greatest age. | musical : musical_id , name , year , award , category , nominee , result | actor : actor_id , name , musical_id , character , duration , age | actor.musical_id = actor.actor_id | ### Response: select duration from actor order by age desc limit 1
musical
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: What are the names of musicals with nominee "Bob Fosse"? | musical : musical_id , name , year , award , category , nominee , result | actor : actor_id , name , musical_id , character , duration , age | actor.musical_id = actor.actor_id | ### Response: select name from musical where nominee = 'Bob Fosse'
musical
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: Return the names of musicals who have the nominee Bob Fosse. | musical : musical_id , name , year , award , category , nominee , result | actor : actor_id , name , musical_id , character , duration , age | actor.musical_id = actor.actor_id | ### Response: select name from musical where nominee = 'Bob Fosse'
musical
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: What are the distinct nominees of the musicals with the award that is not "Tony Award"? | musical : musical_id , name , year , award , category , nominee , result | actor : actor_id , name , musical_id , character , duration , age | actor.musical_id = actor.actor_id | ### Response: select distinct nominee from musical where award != 'Tony Award'
musical
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: Return the different nominees of musicals that have an award that is not the Tony Award. | musical : musical_id , name , year , award , category , nominee , result | actor : actor_id , name , musical_id , character , duration , age | actor.musical_id = actor.actor_id | ### Response: select distinct nominee from musical where award != 'Tony Award'
musical
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: Show names of actors and names of musicals they are in. | musical : musical_id , name , year , award , category , nominee , result | actor : actor_id , name , musical_id , character , duration , age | actor.musical_id = actor.actor_id | ### Response: select actor.name , musical.name from actor join musical on actor.musical_id = musical.musical_id
musical
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: What are the names of actors and the musicals that they are in? | musical : musical_id , name , year , award , category , nominee , result | actor : actor_id , name , musical_id , character , duration , age | actor.musical_id = actor.actor_id | ### Response: select actor.name , musical.name from actor join musical on actor.musical_id = musical.musical_id
musical
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: Show names of actors that have appeared in musical with name "The Phantom of the Opera". | musical : musical_id , name , year , award , category , nominee , result | actor : actor_id , name , musical_id , character , duration , age | actor.musical_id = actor.actor_id | ### Response: select actor.name from actor join musical on actor.musical_id = musical.musical_id where musical.name = 'The Phantom of the Opera'
musical
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: What are the names of actors who have been in the musical titled The Phantom of the Opera? | musical : musical_id , name , year , award , category , nominee , result | actor : actor_id , name , musical_id , character , duration , age | actor.musical_id = actor.actor_id | ### Response: select actor.name from actor join musical on actor.musical_id = musical.musical_id where musical.name = 'The Phantom of the Opera'
musical
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: Show names of actors in descending order of the year their musical is awarded. | musical : musical_id , name , year , award , category , nominee , result | actor : actor_id , name , musical_id , character , duration , age | actor.musical_id = actor.actor_id | ### Response: select actor.name from actor join musical on actor.musical_id = musical.musical_id order by musical.year desc
musical
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: What are the names of actors ordered descending by the year in which their musical was awarded? | musical : musical_id , name , year , award , category , nominee , result | actor : actor_id , name , musical_id , character , duration , age | actor.musical_id = actor.actor_id | ### Response: select actor.name from actor join musical on actor.musical_id = musical.musical_id order by musical.year desc
musical
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: Show names of musicals and the number of actors who have appeared in the musicals. | musical : musical_id , name , year , award , category , nominee , result | actor : actor_id , name , musical_id , character , duration , age | actor.musical_id = actor.actor_id | ### Response: select musical.name , count ( * ) from actor join musical on actor.musical_id = musical.musical_id group by actor.musical_id
musical
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: How many actors have appeared in each musical? | musical : musical_id , name , year , award , category , nominee , result | actor : actor_id , name , musical_id , character , duration , age | actor.musical_id = actor.actor_id | ### Response: select musical.name , count ( * ) from actor join musical on actor.musical_id = musical.musical_id group by actor.musical_id
musical
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: Show names of musicals which have at least three actors. | musical : musical_id , name , year , award , category , nominee , result | actor : actor_id , name , musical_id , character , duration , age | actor.musical_id = actor.actor_id | ### Response: select musical.name from actor join musical on actor.musical_id = musical.musical_id group by actor.musical_id having count ( * ) >= 3
musical
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: What are the names of musicals who have at 3 or more actors? | musical : musical_id , name , year , award , category , nominee , result | actor : actor_id , name , musical_id , character , duration , age | actor.musical_id = actor.actor_id | ### Response: select musical.name from actor join musical on actor.musical_id = musical.musical_id group by actor.musical_id having count ( * ) >= 3
musical
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: Show different nominees and the number of musicals they have been nominated. | musical : musical_id , name , year , award , category , nominee , result | actor : actor_id , name , musical_id , character , duration , age | actor.musical_id = actor.actor_id | ### Response: select nominee , count ( * ) from musical group by nominee
musical
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: How many musicals has each nominee been nominated for? | musical : musical_id , name , year , award , category , nominee , result | actor : actor_id , name , musical_id , character , duration , age | actor.musical_id = actor.actor_id | ### Response: select nominee , count ( * ) from musical group by nominee
musical
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: Please show the nominee who has been nominated the greatest number of times. | musical : musical_id , name , year , award , category , nominee , result | actor : actor_id , name , musical_id , character , duration , age | actor.musical_id = actor.actor_id | ### Response: select nominee from musical group by nominee order by count ( * ) desc limit 1
musical
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: Who is the nominee who has been nominated for the most musicals? | musical : musical_id , name , year , award , category , nominee , result | actor : actor_id , name , musical_id , character , duration , age | actor.musical_id = actor.actor_id | ### Response: select nominee from musical group by nominee order by count ( * ) desc limit 1
musical
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: List the most common result of the musicals. | musical : musical_id , name , year , award , category , nominee , result | actor : actor_id , name , musical_id , character , duration , age | actor.musical_id = actor.actor_id | ### Response: select result from musical group by result order by count ( * ) desc limit 1
musical
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: Return the most frequent result across all musicals. | musical : musical_id , name , year , award , category , nominee , result | actor : actor_id , name , musical_id , character , duration , age | actor.musical_id = actor.actor_id | ### Response: select result from musical group by result order by count ( * ) desc limit 1
musical
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: List the nominees that have been nominated more than two musicals. | musical : musical_id , name , year , award , category , nominee , result | actor : actor_id , name , musical_id , character , duration , age | actor.musical_id = actor.actor_id | ### Response: select nominee from musical group by nominee having count ( * ) > 2
musical
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: Who are the nominees who have been nominated more than two times? | musical : musical_id , name , year , award , category , nominee , result | actor : actor_id , name , musical_id , character , duration , age | actor.musical_id = actor.actor_id | ### Response: select nominee from musical group by nominee having count ( * ) > 2
musical
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: List the name of musicals that do not have actors. | musical : musical_id , name , year , award , category , nominee , result | actor : actor_id , name , musical_id , character , duration , age | actor.musical_id = actor.actor_id | ### Response: select name from musical where musical_id not in ( select musical_id from actor )
musical
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: What are the names of musicals who have no actors? | musical : musical_id , name , year , award , category , nominee , result | actor : actor_id , name , musical_id , character , duration , age | actor.musical_id = actor.actor_id | ### Response: select name from musical where musical_id not in ( select musical_id from actor )
musical
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: Show the nominees that have nominated musicals for both "Tony Award" and "Drama Desk Award". | musical : musical_id , name , year , award , category , nominee , result | actor : actor_id , name , musical_id , character , duration , age | actor.musical_id = actor.actor_id | ### Response: select nominee from musical where award = 'Tony Award' intersect select nominee from musical where award = 'Drama Desk Award'
musical
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: Who are the nominees who have been nominated for both a Tony Award and a Drama Desk Award? | musical : musical_id , name , year , award , category , nominee , result | actor : actor_id , name , musical_id , character , duration , age | actor.musical_id = actor.actor_id | ### Response: select nominee from musical where award = 'Tony Award' intersect select nominee from musical where award = 'Drama Desk Award'
musical
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: Show the musical nominee with award "Bob Fosse" or "Cleavant Derricks". | musical : musical_id , name , year , award , category , nominee , result | actor : actor_id , name , musical_id , character , duration , age | actor.musical_id = actor.actor_id | ### Response: select nominee from musical where award = 'Tony Award' or award = 'Cleavant Derricks'
musical
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: Who are the nominees who were nominated for either of the Bob Fosse or Cleavant Derricks awards? | musical : musical_id , name , year , award , category , nominee , result | actor : actor_id , name , musical_id , character , duration , age | actor.musical_id = actor.actor_id | ### Response: select nominee from musical where award = 'Tony Award' or award = 'Cleavant Derricks'
twitter_1
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: Find the emails of the user named "Mary". | follows : f1 , f2 | tweets : id , uid , text , createdate | user_profiles : uid , name , email , partitionid , followers | follows.f2 = user_profiles.uid | follows.f1 = user_profiles.uid | tweets.uid = user_profiles.uid | ### Response: select email from user_profiles where name = 'Mary'
twitter_1
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: What is the partition id of the user named "Iron Man". | follows : f1 , f2 | tweets : id , uid , text , createdate | user_profiles : uid , name , email , partitionid , followers | follows.f2 = user_profiles.uid | follows.f1 = user_profiles.uid | tweets.uid = user_profiles.uid | ### Response: select partitionid from user_profiles where name = 'Iron Man'
twitter_1
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: How many users are there? | follows : f1 , f2 | tweets : id , uid , text , createdate | user_profiles : uid , name , email , partitionid , followers | follows.f2 = user_profiles.uid | follows.f1 = user_profiles.uid | tweets.uid = user_profiles.uid | ### Response: select count ( * ) from user_profiles
twitter_1
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: How many followers does each user have? | follows : f1 , f2 | tweets : id , uid , text , createdate | user_profiles : uid , name , email , partitionid , followers | follows.f2 = user_profiles.uid | follows.f1 = user_profiles.uid | tweets.uid = user_profiles.uid | ### Response: select count ( * ) from follows
twitter_1
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: Find the number of followers for each user. | follows : f1 , f2 | tweets : id , uid , text , createdate | user_profiles : uid , name , email , partitionid , followers | follows.f2 = user_profiles.uid | follows.f1 = user_profiles.uid | tweets.uid = user_profiles.uid | ### Response: select count ( * ) from follows group by f1
twitter_1
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: Find the number of tweets in record. | follows : f1 , f2 | tweets : id , uid , text , createdate | user_profiles : uid , name , email , partitionid , followers | follows.f2 = user_profiles.uid | follows.f1 = user_profiles.uid | tweets.uid = user_profiles.uid | ### Response: select count ( * ) from tweets
twitter_1
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: Find the number of users who posted some tweets. | follows : f1 , f2 | tweets : id , uid , text , createdate | user_profiles : uid , name , email , partitionid , followers | follows.f2 = user_profiles.uid | follows.f1 = user_profiles.uid | tweets.uid = user_profiles.uid | ### Response: select count ( distinct uid ) from tweets
twitter_1
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: Find the name and email of the user whose name contains the word 'Swift'. | follows : f1 , f2 | tweets : id , uid , text , createdate | user_profiles : uid , name , email , partitionid , followers | follows.f2 = user_profiles.uid | follows.f1 = user_profiles.uid | tweets.uid = user_profiles.uid | ### Response: select name , email from user_profiles where name like '%Swift%'
twitter_1
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: Find the names of users whose emails contain 'superstar' or 'edu'. | follows : f1 , f2 | tweets : id , uid , text , createdate | user_profiles : uid , name , email , partitionid , followers | follows.f2 = user_profiles.uid | follows.f1 = user_profiles.uid | tweets.uid = user_profiles.uid | ### Response: select name from user_profiles where email like '%superstar%' or email like '%edu%'
twitter_1
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: Return the text of tweets about the topic 'intern'. | follows : f1 , f2 | tweets : id , uid , text , createdate | user_profiles : uid , name , email , partitionid , followers | follows.f2 = user_profiles.uid | follows.f1 = user_profiles.uid | tweets.uid = user_profiles.uid | ### Response: select text from tweets where text like '%intern%'
twitter_1
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: Find the name and email of the users who have more than 1000 followers. | follows : f1 , f2 | tweets : id , uid , text , createdate | user_profiles : uid , name , email , partitionid , followers | follows.f2 = user_profiles.uid | follows.f1 = user_profiles.uid | tweets.uid = user_profiles.uid | ### Response: select name , email from user_profiles where followers > 1000
twitter_1
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: Find the names of the users whose number of followers is greater than that of the user named "Tyler Swift". | follows : f1 , f2 | tweets : id , uid , text , createdate | user_profiles : uid , name , email , partitionid , followers | follows.f2 = user_profiles.uid | follows.f1 = user_profiles.uid | tweets.uid = user_profiles.uid | ### Response: select user_profiles.name from user_profiles join follows on user_profiles.uid = follows.f1 group by follows.f1 having count ( * ) > ( select count ( * ) from user_profiles join follows on user_profiles.uid = follows.f1 where user_profiles.name = 'Tyler Swift' )
twitter_1
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: Find the name and email for the users who have more than one follower. | follows : f1 , f2 | tweets : id , uid , text , createdate | user_profiles : uid , name , email , partitionid , followers | follows.f2 = user_profiles.uid | follows.f1 = user_profiles.uid | tweets.uid = user_profiles.uid | ### Response: select user_profiles.name , user_profiles.email from user_profiles join follows on user_profiles.uid = follows.f1 group by follows.f1 having count ( * ) > 1
twitter_1
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: Find the names of users who have more than one tweet. | follows : f1 , f2 | tweets : id , uid , text , createdate | user_profiles : uid , name , email , partitionid , followers | follows.f2 = user_profiles.uid | follows.f1 = user_profiles.uid | tweets.uid = user_profiles.uid | ### Response: select user_profiles.name from user_profiles join tweets on user_profiles.uid = tweets.uid group by tweets.uid having count ( * ) > 1
twitter_1
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: Find the id of users who are followed by Mary and Susan. | follows : f1 , f2 | tweets : id , uid , text , createdate | user_profiles : uid , name , email , partitionid , followers | follows.f2 = user_profiles.uid | follows.f1 = user_profiles.uid | tweets.uid = user_profiles.uid | ### Response: select follows.f1 from user_profiles join follows on user_profiles.uid = follows.f2 where user_profiles.name = 'Mary' intersect select follows.f1 from user_profiles join follows on user_profiles.uid = follows.f2 where user_profiles.name = 'Susan'
twitter_1
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: Find the id of users who are followed by Mary or Susan. | follows : f1 , f2 | tweets : id , uid , text , createdate | user_profiles : uid , name , email , partitionid , followers | follows.f2 = user_profiles.uid | follows.f1 = user_profiles.uid | tweets.uid = user_profiles.uid | ### Response: select follows.f1 from user_profiles join follows on user_profiles.uid = follows.f2 where user_profiles.name = 'Mary' or user_profiles.name = 'Susan'
twitter_1
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: Find the name of the user who has the largest number of followers. | follows : f1 , f2 | tweets : id , uid , text , createdate | user_profiles : uid , name , email , partitionid , followers | follows.f2 = user_profiles.uid | follows.f1 = user_profiles.uid | tweets.uid = user_profiles.uid | ### Response: select name from user_profiles order by followers desc limit 1
twitter_1
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: Find the name and email of the user followed by the least number of people. | follows : f1 , f2 | tweets : id , uid , text , createdate | user_profiles : uid , name , email , partitionid , followers | follows.f2 = user_profiles.uid | follows.f1 = user_profiles.uid | tweets.uid = user_profiles.uid | ### Response: select name , email from user_profiles order by followers asc limit 1
twitter_1
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: List the name and number of followers for each user, and sort the results by the number of followers in descending order. | follows : f1 , f2 | tweets : id , uid , text , createdate | user_profiles : uid , name , email , partitionid , followers | follows.f2 = user_profiles.uid | follows.f1 = user_profiles.uid | tweets.uid = user_profiles.uid | ### Response: select name , followers from user_profiles order by followers desc
twitter_1
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: List the names of 5 users followed by the largest number of other users. | follows : f1 , f2 | tweets : id , uid , text , createdate | user_profiles : uid , name , email , partitionid , followers | follows.f2 = user_profiles.uid | follows.f1 = user_profiles.uid | tweets.uid = user_profiles.uid | ### Response: select name from user_profiles order by followers desc limit 5
twitter_1
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: List the text of all tweets in the order of date. | follows : f1 , f2 | tweets : id , uid , text , createdate | user_profiles : uid , name , email , partitionid , followers | follows.f2 = user_profiles.uid | follows.f1 = user_profiles.uid | tweets.uid = user_profiles.uid | ### Response: select text from tweets order by createdate asc
twitter_1
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: Find the name of each user and number of tweets tweeted by each of them. | follows : f1 , f2 | tweets : id , uid , text , createdate | user_profiles : uid , name , email , partitionid , followers | follows.f2 = user_profiles.uid | follows.f1 = user_profiles.uid | tweets.uid = user_profiles.uid | ### Response: select user_profiles.name , count ( * ) from user_profiles join tweets on user_profiles.uid = tweets.uid group by tweets.uid
twitter_1
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: Find the name and partition id for users who tweeted less than twice. | follows : f1 , f2 | tweets : id , uid , text , createdate | user_profiles : uid , name , email , partitionid , followers | follows.f2 = user_profiles.uid | follows.f1 = user_profiles.uid | tweets.uid = user_profiles.uid | ### Response: select user_profiles.name , user_profiles.partitionid from user_profiles join tweets on user_profiles.uid = tweets.uid group by tweets.uid having count ( * ) < 2
twitter_1
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: Find the name of the user who tweeted more than once, and number of tweets tweeted by them. | follows : f1 , f2 | tweets : id , uid , text , createdate | user_profiles : uid , name , email , partitionid , followers | follows.f2 = user_profiles.uid | follows.f1 = user_profiles.uid | tweets.uid = user_profiles.uid | ### Response: select user_profiles.name , count ( * ) from user_profiles join tweets on user_profiles.uid = tweets.uid group by tweets.uid having count ( * ) > 1
twitter_1
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: Find the average number of followers for the users who do not have any tweet. | follows : f1 , f2 | tweets : id , uid , text , createdate | user_profiles : uid , name , email , partitionid , followers | follows.f2 = user_profiles.uid | follows.f1 = user_profiles.uid | tweets.uid = user_profiles.uid | ### Response: select avg ( followers ) from user_profiles where uid not in ( select uid from tweets )
twitter_1
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: Find the average number of followers for the users who had some tweets. | follows : f1 , f2 | tweets : id , uid , text , createdate | user_profiles : uid , name , email , partitionid , followers | follows.f2 = user_profiles.uid | follows.f1 = user_profiles.uid | tweets.uid = user_profiles.uid | ### Response: select avg ( followers ) from user_profiles where uid in ( select uid from tweets )