richardr1126/spider-skeleton-context-instruct huggingface dataset:
### Instruction:

Convert text to sql: Find the name of the person who has friends with age above 40 but not under age 30? | person : name , age , city , gender , job | personfriend : name , friend , year | personfriend.friend = person.name | personfriend.name = person.name | 

### Response:

select _ from _ where _ in ( select _ from _ where _ ) except select _ from _ where _ in ( select _ from _ where _ ) | select person.name from person join personfriend on person.name = personfriend.name where personfriend.friend in ( select name from person where age > 40 ) except select person.name from person join personfriend on person.name = personfriend.name where personfriend.friend in ( select name from person where age < 30 )
### Instruction:

Convert text to sql: What are the names of the people who are older 40 but no friends under age 30? | person : name , age , city , gender , job | personfriend : name , friend , year | personfriend.friend = person.name | personfriend.name = person.name | 

### Response:

select _ from _ where _ in ( select _ from _ where _ ) except select _ from _ where _ in ( select _ from _ where _ ) | select person.name from person join personfriend on person.name = personfriend.name where personfriend.friend in ( select name from person where age > 40 ) except select person.name from person join personfriend on person.name = personfriend.name where personfriend.friend in ( select name from person where age < 30 )
### Instruction:

Convert text to sql: Find the name of the person who has no student friends. | person : name , age , city , gender , job | personfriend : name , friend , year | personfriend.friend = person.name | personfriend.name = person.name | 

### Response:

select _ from _ except select _ from _ where _ | select name from person except select personfriend.name from person join personfriend on person.name = personfriend.friend where person.job = 'student'
### Instruction:

Convert text to sql: What are the names of the people who have no friends who are students? | person : name , age , city , gender , job | personfriend : name , friend , year | personfriend.friend = person.name | personfriend.name = person.name | 

### Response:

select _ from _ except select _ from _ where _ | select name from person except select personfriend.name from person join personfriend on person.name = personfriend.friend where person.job = 'student'
### Instruction:

Convert text to sql: Find the person who has exactly one friend. | person : name , age , city , gender , job | personfriend : name , friend , year | personfriend.friend = person.name | personfriend.name = person.name | 

### Response:

select _ from _ group by _ having count ( _ ) = _ | select name from personfriend group by name having count ( * ) = 1
### Instruction:

Convert text to sql: What are the names of everybody who has exactly one friend? | person : name , age , city , gender , job | personfriend : name , friend , year | personfriend.friend = person.name | personfriend.name = person.name | 

### Response:

select _ from _ group by _ having count ( _ ) = _ | select name from personfriend group by name having count ( * ) = 1
### Instruction:

Convert text to sql: Who are the friends of Bob? | person : name , age , city , gender , job | personfriend : name , friend , year | personfriend.friend = person.name | personfriend.name = person.name | 

### Response:

select _ from _ where _ | select personfriend.friend from person join personfriend on person.name = personfriend.name where person.name = 'Bob'
### Instruction:

Convert text to sql: Who are Bob's friends? | person : name , age , city , gender , job | personfriend : name , friend , year | personfriend.friend = person.name | personfriend.name = person.name | 

### Response:

select _ from _ where _ | select personfriend.friend from person join personfriend on person.name = personfriend.name where person.name = 'Bob'
### Instruction:

Convert text to sql: Find the name of persons who are friends with Bob. | person : name , age , city , gender , job | personfriend : name , friend , year | personfriend.friend = person.name | personfriend.name = person.name | 

### Response:

select _ from _ where _ | select person.name from person join personfriend on person.name = personfriend.name where personfriend.friend = 'Bob'
### Instruction:

Convert text to sql: What are the names of all of Bob's friends? | person : name , age , city , gender , job | personfriend : name , friend , year | personfriend.friend = person.name | personfriend.name = person.name | 

### Response:

select _ from _ where _ | select person.name from person join personfriend on person.name = personfriend.name where personfriend.friend = 'Bob'
### Instruction:

Convert text to sql: Find the names of females who are friends with Zach | person : name , age , city , gender , job | personfriend : name , friend , year | personfriend.friend = person.name | personfriend.name = person.name | 

### Response:

select _ from _ where _ | select person.name from person join personfriend on person.name = personfriend.name where personfriend.friend = 'Zach' and person.gender = 'female'
### Instruction:

Convert text to sql: What are the names of all females who are friends with Zach? | person : name , age , city , gender , job | personfriend : name , friend , year | personfriend.friend = person.name | personfriend.name = person.name | 

### Response:

select _ from _ where _ | select person.name from person join personfriend on person.name = personfriend.name where personfriend.friend = 'Zach' and person.gender = 'female'
### Instruction:

Convert text to sql: Find the female friends of Alice. | person : name , age , city , gender , job | personfriend : name , friend , year | personfriend.friend = person.name | personfriend.name = person.name | 

### Response:

select _ from _ where _ | select personfriend.friend from person join personfriend on person.name = personfriend.friend where personfriend.name = 'Alice' and person.gender = 'female'
### Instruction:

Convert text to sql: What are all the friends of Alice who are female? | person : name , age , city , gender , job | personfriend : name , friend , year | personfriend.friend = person.name | personfriend.name = person.name | 

### Response:

select _ from _ where _ | select personfriend.friend from person join personfriend on person.name = personfriend.friend where personfriend.name = 'Alice' and person.gender = 'female'
### Instruction:

Convert text to sql: Find the male friend of Alice whose job is a doctor? | person : name , age , city , gender , job | personfriend : name , friend , year | personfriend.friend = person.name | personfriend.name = person.name | 

### Response:

select _ from _ where _ | select personfriend.friend from person join personfriend on person.name = personfriend.friend where personfriend.name = 'Alice' and person.gender = 'male' and person.job = 'doctor'
### Instruction:

Convert text to sql: Who are the friends of Alice that are doctors? | person : name , age , city , gender , job | personfriend : name , friend , year | personfriend.friend = person.name | personfriend.name = person.name | 

### Response:

select _ from _ where _ | select personfriend.friend from person join personfriend on person.name = personfriend.friend where personfriend.name = 'Alice' and person.gender = 'male' and person.job = 'doctor'
### Instruction:

Convert text to sql: Who has a friend that is from new york city? | person : name , age , city , gender , job | personfriend : name , friend , year | personfriend.friend = person.name | personfriend.name = person.name | 

### Response:

select _ from _ where _ | select personfriend.name from person join personfriend on person.name = personfriend.friend where person.city = 'new york city'
### Instruction:

Convert text to sql: What are the names of all friends who are from New York? | person : name , age , city , gender , job | personfriend : name , friend , year | personfriend.friend = person.name | personfriend.name = person.name | 

### Response:

select _ from _ where _ | select personfriend.name from person join personfriend on person.name = personfriend.friend where person.city = 'new york city'
### Instruction:

Convert text to sql: Who has friends that are younger than the average age? | person : name , age , city , gender , job | personfriend : name , friend , year | personfriend.friend = person.name | personfriend.name = person.name | 

### Response:

select distinct _ from _ where _ < ( select avg ( _ ) from _ ) | select distinct personfriend.name from person join personfriend on person.name = personfriend.friend where person.age < ( select avg ( age ) from person )
### Instruction:

Convert text to sql: What are the different names of friends who are younger than the average age for a friend? | person : name , age , city , gender , job | personfriend : name , friend , year | personfriend.friend = person.name | personfriend.name = person.name | 

### Response:

select distinct _ from _ where _ < ( select avg ( _ ) from _ ) | select distinct personfriend.name from person join personfriend on person.name = personfriend.friend where person.age < ( select avg ( age ) from person )
### Instruction:

Convert text to sql: Who has friends that are older than the average age? Print their friends and their ages as well | person : name , age , city , gender , job | personfriend : name , friend , year | personfriend.friend = person.name | personfriend.name = person.name | 

### Response:

select distinct _ from _ where _ > ( select avg ( _ ) from _ ) | select distinct personfriend.name , personfriend.friend , person.age from person join personfriend on person.name = personfriend.friend where person.age > ( select avg ( age ) from person )
### Instruction:

Convert text to sql: Whare the names, friends, and ages of all people who are older than the average age of a person? | person : name , age , city , gender , job | personfriend : name , friend , year | personfriend.friend = person.name | personfriend.name = person.name | 

### Response:

select distinct _ from _ where _ > ( select avg ( _ ) from _ ) | select distinct personfriend.name , personfriend.friend , person.age from person join personfriend on person.name = personfriend.friend where person.age > ( select avg ( age ) from person )
### Instruction:

Convert text to sql: Who is the friend of Zach with longest year relationship? | person : name , age , city , gender , job | personfriend : name , friend , year | personfriend.friend = person.name | personfriend.name = person.name | 

### Response:

select _ from _ where _ = ( select max ( _ ) from _ where _ ) | select friend from personfriend where name = 'Zach' and year = ( select max ( year ) from personfriend where name = 'Zach' )
### Instruction:

Convert text to sql: Which friend of Zach has the longest-lasting friendship? | person : name , age , city , gender , job | personfriend : name , friend , year | personfriend.friend = person.name | personfriend.name = person.name | 

### Response:

select _ from _ where _ = ( select max ( _ ) from _ where _ ) | select friend from personfriend where name = 'Zach' and year = ( select max ( year ) from personfriend where name = 'Zach' )
### Instruction:

Convert text to sql: What is the age of the friend of Zach with longest year relationship? | person : name , age , city , gender , job | personfriend : name , friend , year | personfriend.friend = person.name | personfriend.name = person.name | 

### Response:

select _ from _ where _ = ( select max ( _ ) from _ where _ ) | select person.age from person join personfriend on person.name = personfriend.friend where personfriend.name = 'Zach' and personfriend.year = ( select max ( year ) from personfriend where name = 'Zach' )
### Instruction:

Convert text to sql: What are the ages of all of Zach's friends who are in the longest relationship? | person : name , age , city , gender , job | personfriend : name , friend , year | personfriend.friend = person.name | personfriend.name = person.name | 

### Response:

select _ from _ where _ = ( select max ( _ ) from _ where _ ) | select person.age from person join personfriend on person.name = personfriend.friend where personfriend.name = 'Zach' and personfriend.year = ( select max ( year ) from personfriend where name = 'Zach' )
### Instruction:

Convert text to sql: Find the name of persons who are friends with Alice for the shortest years. | person : name , age , city , gender , job | personfriend : name , friend , year | personfriend.friend = person.name | personfriend.name = person.name | 

### Response:

select _ from _ where _ = ( select min ( _ ) from _ where _ ) | select name from personfriend where friend = 'Alice' and year = ( select min ( year ) from personfriend where friend = 'Alice' )
### Instruction:

Convert text to sql: What are the names of all people who are friends with Alice for the shortest amount of time? | person : name , age , city , gender , job | personfriend : name , friend , year | personfriend.friend = person.name | personfriend.name = person.name | 

### Response:

select _ from _ where _ = ( select min ( _ ) from _ where _ ) | select name from personfriend where friend = 'Alice' and year = ( select min ( year ) from personfriend where friend = 'Alice' )
### Instruction:

Convert text to sql: Find the name, age, and job title of persons who are friends with Alice for the longest years. | person : name , age , city , gender , job | personfriend : name , friend , year | personfriend.friend = person.name | personfriend.name = person.name | 

### Response:

select _ from _ where _ = ( select max ( _ ) from _ where _ ) | select person.name , person.age , person.job from person join personfriend on person.name = personfriend.name where personfriend.friend = 'Alice' and personfriend.year = ( select max ( year ) from personfriend where friend = 'Alice' )
### Instruction:

Convert text to sql: What are the names, ages, and jobs of all people who are friends with Alice for the longest amount of time? | person : name , age , city , gender , job | personfriend : name , friend , year | personfriend.friend = person.name | personfriend.name = person.name | 

### Response:

select _ from _ where _ = ( select max ( _ ) from _ where _ ) | select person.name , person.age , person.job from person join personfriend on person.name = personfriend.name where personfriend.friend = 'Alice' and personfriend.year = ( select max ( year ) from personfriend where friend = 'Alice' )
### Instruction:

Convert text to sql: Who is the person that has no friend? | person : name , age , city , gender , job | personfriend : name , friend , year | personfriend.friend = person.name | personfriend.name = person.name | 

### Response:

select _ from _ except select _ from _ | select name from person except select name from personfriend
### Instruction:

Convert text to sql: What are the names of all people who do not have friends? | person : name , age , city , gender , job | personfriend : name , friend , year | personfriend.friend = person.name | personfriend.name = person.name | 

### Response:

select _ from _ except select _ from _ | select name from person except select name from personfriend
### Instruction:

Convert text to sql: Which person whose friends have the oldest average age? | person : name , age , city , gender , job | personfriend : name , friend , year | personfriend.friend = person.name | personfriend.name = person.name | 

### Response:

select _ , avg ( _ ) from _ group by _ order by avg ( _ ) desc limit _ | select personfriend.name , avg ( person.age ) from person join personfriend on person.name = personfriend.friend group by personfriend.name order by avg ( person.age ) desc limit 1
### Instruction:

Convert text to sql: What is the name of the person who has the oldest average age for their friends, and what is that average age? | person : name , age , city , gender , job | personfriend : name , friend , year | personfriend.friend = person.name | personfriend.name = person.name | 

### Response:

select _ , avg ( _ ) from _ group by _ order by avg ( _ ) desc limit _ | select personfriend.name , avg ( person.age ) from person join personfriend on person.name = personfriend.friend group by personfriend.name order by avg ( person.age ) desc limit 1
### Instruction:

Convert text to sql: What is the total number of people who has no friend living in the city of Austin. | person : name , age , city , gender , job | personfriend : name , friend , year | personfriend.friend = person.name | personfriend.name = person.name | 

### Response:

select count ( distinct _ ) from _ where _ not in ( select _ from _ where _ ) | select count ( distinct name ) from personfriend where friend not in ( select name from person where city = 'Austin' )
### Instruction:

Convert text to sql: What is the total number of people who have no friends living in Austin? | person : name , age , city , gender , job | personfriend : name , friend , year | personfriend.friend = person.name | personfriend.name = person.name | 

### Response:

select count ( distinct _ ) from _ where _ not in ( select _ from _ where _ ) | select count ( distinct name ) from personfriend where friend not in ( select name from person where city = 'Austin' )
### Instruction:

Convert text to sql: Find Alice's friends of friends. | person : name , age , city , gender , job | personfriend : name , friend , year | personfriend.friend = person.name | personfriend.name = person.name | 

### Response:

select distinct _ from _ where _ | select distinct personfriend.name from personfriend join person on personfriend.name = person.name join personfriend on personfriend.friend = personfriend.name join personfriend on personfriend.friend = personfriend.name where person.name = 'Alice' and personfriend.name != 'Alice'
### Instruction:

Convert text to sql: What are the names of all of Alice's friends of friends? | person : name , age , city , gender , job | personfriend : name , friend , year | personfriend.friend = person.name | personfriend.name = person.name | 

### Response:

select distinct _ from _ where _ | select distinct personfriend.name from personfriend join person on personfriend.name = person.name join personfriend on personfriend.friend = personfriend.name join personfriend on personfriend.friend = personfriend.name where person.name = 'Alice' and personfriend.name != 'Alice'
### Instruction:

Convert text to sql: How many members are there? | college : college_id , name , leader_name , college_location | member : member_id , name , country , college_id | round : round_id , member_id , decoration_theme , rank_in_round | member.college_id = college.college_id | round.member_id = member.member_id | 

### Response:

select count ( _ ) from _ | select count ( * ) from member
### Instruction:

Convert text to sql: List the names of members in ascending alphabetical order. | college : college_id , name , leader_name , college_location | member : member_id , name , country , college_id | round : round_id , member_id , decoration_theme , rank_in_round | member.college_id = college.college_id | round.member_id = member.member_id | 

### Response:

select _ from _ order by _ asc | select name from member order by name asc
### Instruction:

Convert text to sql: What are the names and countries of members? | college : college_id , name , leader_name , college_location | member : member_id , name , country , college_id | round : round_id , member_id , decoration_theme , rank_in_round | member.college_id = college.college_id | round.member_id = member.member_id | 

### Response:

select _ from _ | select name , country from member
### Instruction:

Convert text to sql: Show the names of members whose country is "United States" or "Canada". | college : college_id , name , leader_name , college_location | member : member_id , name , country , college_id | round : round_id , member_id , decoration_theme , rank_in_round | member.college_id = college.college_id | round.member_id = member.member_id | 

### Response:

select _ from _ where _ | select name from member where country = 'United States' or country = 'Canada'
### Instruction:

Convert text to sql: Show the different countries and the number of members from each. | college : college_id , name , leader_name , college_location | member : member_id , name , country , college_id | round : round_id , member_id , decoration_theme , rank_in_round | member.college_id = college.college_id | round.member_id = member.member_id | 

### Response:

select _ , count ( _ ) from _ group by _ | select country , count ( * ) from member group by country
### Instruction:

Convert text to sql: Show the most common country across members. | college : college_id , name , leader_name , college_location | member : member_id , name , country , college_id | round : round_id , member_id , decoration_theme , rank_in_round | member.college_id = college.college_id | round.member_id = member.member_id | 

### Response:

select _ from _ group by _ order by count ( _ ) desc limit _ | select country from member group by country order by count ( * ) desc limit 1
### Instruction:

Convert text to sql: Which countries have more than two members? | college : college_id , name , leader_name , college_location | member : member_id , name , country , college_id | round : round_id , member_id , decoration_theme , rank_in_round | member.college_id = college.college_id | round.member_id = member.member_id | 

### Response:

select _ from _ group by _ having count ( _ ) > _ | select country from member group by country having count ( * ) > 2
### Instruction:

Convert text to sql: Show the leader names and locations of colleges. | college : college_id , name , leader_name , college_location | member : member_id , name , country , college_id | round : round_id , member_id , decoration_theme , rank_in_round | member.college_id = college.college_id | round.member_id = member.member_id | 

### Response:

select _ from _ | select leader_name , college_location from college
### Instruction:

Convert text to sql: Show the names of members and names of colleges they go to. | college : college_id , name , leader_name , college_location | member : member_id , name , country , college_id | round : round_id , member_id , decoration_theme , rank_in_round | member.college_id = college.college_id | round.member_id = member.member_id | 

### Response:

select _ from _ | select member.name , college.name from college join member on college.college_id = member.college_id
### Instruction:

Convert text to sql: Show the names of members and the locations of colleges they go to in ascending alphabetical order of member names. | college : college_id , name , leader_name , college_location | member : member_id , name , country , college_id | round : round_id , member_id , decoration_theme , rank_in_round | member.college_id = college.college_id | round.member_id = member.member_id | 

### Response:

select _ from _ order by _ asc | select member.name , college.college_location from college join member on college.college_id = member.college_id order by member.name asc
### Instruction:

Convert text to sql: Show the distinct leader names of colleges associated with members from country "Canada". | college : college_id , name , leader_name , college_location | member : member_id , name , country , college_id | round : round_id , member_id , decoration_theme , rank_in_round | member.college_id = college.college_id | round.member_id = member.member_id | 

### Response:

select distinct _ from _ where _ | select distinct college.leader_name from college join member on college.college_id = member.college_id where member.country = 'Canada'
### Instruction:

Convert text to sql: Show the names of members and the decoration themes they have. | college : college_id , name , leader_name , college_location | member : member_id , name , country , college_id | round : round_id , member_id , decoration_theme , rank_in_round | member.college_id = college.college_id | round.member_id = member.member_id | 

### Response:

select _ from _ | select member.name , round.decoration_theme from member join round on member.member_id = round.member_id