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

Convert text to sql: What is the name of the track that has had the greatest number of races? | race : race_id , name , class , date , track_id | track : track_id , name , location , seating , year_opened | race.track_id = track.track_id | 

### Response:

select _ from _ group by _ order by count ( _ ) desc limit _ | select track.name from race join track on race.track_id = track.track_id group by race.track_id order by count ( * ) desc limit 1
### Instruction:

Convert text to sql: Show the name and date for each race and its track name. | race : race_id , name , class , date , track_id | track : track_id , name , location , seating , year_opened | race.track_id = track.track_id | 

### Response:

select _ from _ | select race.name , race.date , track.name from race join track on race.track_id = track.track_id
### Instruction:

Convert text to sql: What are the names and dates of races, and the names of the tracks where they are held? | race : race_id , name , class , date , track_id | track : track_id , name , location , seating , year_opened | race.track_id = track.track_id | 

### Response:

select _ from _ | select race.name , race.date , track.name from race join track on race.track_id = track.track_id
### Instruction:

Convert text to sql: Show the name and location of track with 1 race. | race : race_id , name , class , date , track_id | track : track_id , name , location , seating , year_opened | race.track_id = track.track_id | 

### Response:

select _ from _ group by _ having count ( _ ) = _ | select track.name , track.location from race join track on race.track_id = track.track_id group by race.track_id having count ( * ) = 1
### Instruction:

Convert text to sql: What are the names and locations of tracks that have had exactly 1 race? | race : race_id , name , class , date , track_id | track : track_id , name , location , seating , year_opened | race.track_id = track.track_id | 

### Response:

select _ from _ group by _ having count ( _ ) = _ | select track.name , track.location from race join track on race.track_id = track.track_id group by race.track_id having count ( * ) = 1
### Instruction:

Convert text to sql: Find the locations where have both tracks with more than 90000 seats and tracks with less than 70000 seats. | race : race_id , name , class , date , track_id | track : track_id , name , location , seating , year_opened | race.track_id = track.track_id | 

### Response:

select _ from _ where _ intersect select _ from _ where _ | select location from track where seating > 90000 intersect select location from track where seating < 70000
### Instruction:

Convert text to sql: What are the locations that have both tracks with more than 90000 seats, and tracks with fewer than 70000 seats? | race : race_id , name , class , date , track_id | track : track_id , name , location , seating , year_opened | race.track_id = track.track_id | 

### Response:

select _ from _ where _ intersect select _ from _ where _ | select location from track where seating > 90000 intersect select location from track where seating < 70000
### Instruction:

Convert text to sql: How many members have the black membership card? | shop : shop_id , address , num_of_staff , score , open_year | member : member_id , name , membership_card , age , time_of_purchase , level_of_membership , address | happy_hour : hh_id , shop_id , month , num_of_shaff_in_charge | happy_hour_member : hh_id , member_id , total_amount | happy_hour.shop_id = shop.shop_id | happy_hour_member.member_id = member.member_id | 

### Response:

select count ( _ ) from _ where _ | select count ( * ) from member where membership_card = 'Black'
### Instruction:

Convert text to sql: Find the number of members living in each address. | shop : shop_id , address , num_of_staff , score , open_year | member : member_id , name , membership_card , age , time_of_purchase , level_of_membership , address | happy_hour : hh_id , shop_id , month , num_of_shaff_in_charge | happy_hour_member : hh_id , member_id , total_amount | happy_hour.shop_id = shop.shop_id | happy_hour_member.member_id = member.member_id | 

### Response:

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

Convert text to sql: Give me the names of members whose address is in Harford or Waterbury. | shop : shop_id , address , num_of_staff , score , open_year | member : member_id , name , membership_card , age , time_of_purchase , level_of_membership , address | happy_hour : hh_id , shop_id , month , num_of_shaff_in_charge | happy_hour_member : hh_id , member_id , total_amount | happy_hour.shop_id = shop.shop_id | happy_hour_member.member_id = member.member_id | 

### Response:

select _ from _ where _ | select name from member where address = 'Harford' or address = 'Waterbury'
### Instruction:

Convert text to sql: Find the ids and names of members who are under age 30 or with black membership card. | shop : shop_id , address , num_of_staff , score , open_year | member : member_id , name , membership_card , age , time_of_purchase , level_of_membership , address | happy_hour : hh_id , shop_id , month , num_of_shaff_in_charge | happy_hour_member : hh_id , member_id , total_amount | happy_hour.shop_id = shop.shop_id | happy_hour_member.member_id = member.member_id | 

### Response:

select _ from _ where _ | select name , member_id from member where membership_card = 'Black' or age < 30
### Instruction:

Convert text to sql: Find the purchase time, age and address of each member, and show the results in the order of purchase time. | shop : shop_id , address , num_of_staff , score , open_year | member : member_id , name , membership_card , age , time_of_purchase , level_of_membership , address | happy_hour : hh_id , shop_id , month , num_of_shaff_in_charge | happy_hour_member : hh_id , member_id , total_amount | happy_hour.shop_id = shop.shop_id | happy_hour_member.member_id = member.member_id | 

### Response:

select _ from _ order by _ asc | select time_of_purchase , age , address from member order by time_of_purchase asc
### Instruction:

Convert text to sql: Which membership card has more than 5 members? | shop : shop_id , address , num_of_staff , score , open_year | member : member_id , name , membership_card , age , time_of_purchase , level_of_membership , address | happy_hour : hh_id , shop_id , month , num_of_shaff_in_charge | happy_hour_member : hh_id , member_id , total_amount | happy_hour.shop_id = shop.shop_id | happy_hour_member.member_id = member.member_id | 

### Response:

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

Convert text to sql: Which address has both members younger than 30 and members older than 40? | shop : shop_id , address , num_of_staff , score , open_year | member : member_id , name , membership_card , age , time_of_purchase , level_of_membership , address | happy_hour : hh_id , shop_id , month , num_of_shaff_in_charge | happy_hour_member : hh_id , member_id , total_amount | happy_hour.shop_id = shop.shop_id | happy_hour_member.member_id = member.member_id | 

### Response:

select _ from _ where _ intersect select _ from _ where _ | select address from member where age < 30 intersect select address from member where age > 40
### Instruction:

Convert text to sql: What is the membership card held by both members living in Hartford and ones living in Waterbury address? | shop : shop_id , address , num_of_staff , score , open_year | member : member_id , name , membership_card , age , time_of_purchase , level_of_membership , address | happy_hour : hh_id , shop_id , month , num_of_shaff_in_charge | happy_hour_member : hh_id , member_id , total_amount | happy_hour.shop_id = shop.shop_id | happy_hour_member.member_id = member.member_id | 

### Response:

select _ from _ where _ intersect select _ from _ where _ | select membership_card from member where address = 'Hartford' intersect select membership_card from member where address = 'Waterbury'
### Instruction:

Convert text to sql: How many members are not living in Hartford? | shop : shop_id , address , num_of_staff , score , open_year | member : member_id , name , membership_card , age , time_of_purchase , level_of_membership , address | happy_hour : hh_id , shop_id , month , num_of_shaff_in_charge | happy_hour_member : hh_id , member_id , total_amount | happy_hour.shop_id = shop.shop_id | happy_hour_member.member_id = member.member_id | 

### Response:

select count ( _ ) from _ where _ | select count ( * ) from member where address != 'Hartford'
### Instruction:

Convert text to sql: Which address do not have any member with the black membership card? | shop : shop_id , address , num_of_staff , score , open_year | member : member_id , name , membership_card , age , time_of_purchase , level_of_membership , address | happy_hour : hh_id , shop_id , month , num_of_shaff_in_charge | happy_hour_member : hh_id , member_id , total_amount | happy_hour.shop_id = shop.shop_id | happy_hour_member.member_id = member.member_id | 

### Response:

select _ from _ except select _ from _ where _ | select address from member except select address from member where membership_card = 'Black'
### Instruction:

Convert text to sql: Show the shop addresses ordered by their opening year. | shop : shop_id , address , num_of_staff , score , open_year | member : member_id , name , membership_card , age , time_of_purchase , level_of_membership , address | happy_hour : hh_id , shop_id , month , num_of_shaff_in_charge | happy_hour_member : hh_id , member_id , total_amount | happy_hour.shop_id = shop.shop_id | happy_hour_member.member_id = member.member_id | 

### Response:

select _ from _ order by _ asc | select address from shop order by open_year asc
### Instruction:

Convert text to sql: What are the average score and average staff number of all shops? | shop : shop_id , address , num_of_staff , score , open_year | member : member_id , name , membership_card , age , time_of_purchase , level_of_membership , address | happy_hour : hh_id , shop_id , month , num_of_shaff_in_charge | happy_hour_member : hh_id , member_id , total_amount | happy_hour.shop_id = shop.shop_id | happy_hour_member.member_id = member.member_id | 

### Response:

select avg ( _ ) , avg ( _ ) from _ | select avg ( num_of_staff ) , avg ( score ) from shop
### Instruction:

Convert text to sql: Find the id and address of the shops whose score is below the average score. | shop : shop_id , address , num_of_staff , score , open_year | member : member_id , name , membership_card , age , time_of_purchase , level_of_membership , address | happy_hour : hh_id , shop_id , month , num_of_shaff_in_charge | happy_hour_member : hh_id , member_id , total_amount | happy_hour.shop_id = shop.shop_id | happy_hour_member.member_id = member.member_id | 

### Response:

select _ from _ where _ < ( select avg ( _ ) from _ ) | select shop_id , address from shop where score < ( select avg ( score ) from shop )
### Instruction:

Convert text to sql: Find the address and staff number of the shops that do not have any happy hour. | shop : shop_id , address , num_of_staff , score , open_year | member : member_id , name , membership_card , age , time_of_purchase , level_of_membership , address | happy_hour : hh_id , shop_id , month , num_of_shaff_in_charge | happy_hour_member : hh_id , member_id , total_amount | happy_hour.shop_id = shop.shop_id | happy_hour_member.member_id = member.member_id | 

### Response:

select _ from _ where _ not in ( select _ from _ ) | select address , num_of_staff from shop where shop_id not in ( select shop_id from happy_hour )
### Instruction:

Convert text to sql: What are the id and address of the shops which have a happy hour in May? | shop : shop_id , address , num_of_staff , score , open_year | member : member_id , name , membership_card , age , time_of_purchase , level_of_membership , address | happy_hour : hh_id , shop_id , month , num_of_shaff_in_charge | happy_hour_member : hh_id , member_id , total_amount | happy_hour.shop_id = shop.shop_id | happy_hour_member.member_id = member.member_id | 

### Response:

select _ from _ where _ | select shop.address , shop.shop_id from shop join happy_hour on shop.shop_id = happy_hour.shop_id where month = 'May'
### Instruction:

Convert text to sql: which shop has happy hour most frequently? List its id and number of happy hours. | shop : shop_id , address , num_of_staff , score , open_year | member : member_id , name , membership_card , age , time_of_purchase , level_of_membership , address | happy_hour : hh_id , shop_id , month , num_of_shaff_in_charge | happy_hour_member : hh_id , member_id , total_amount | happy_hour.shop_id = shop.shop_id | happy_hour_member.member_id = member.member_id | 

### Response:

select _ , count ( _ ) from _ group by _ order by count ( _ ) desc limit _ | select shop_id , count ( * ) from happy_hour group by shop_id order by count ( * ) desc limit 1
### Instruction:

Convert text to sql: Which month has the most happy hours? | shop : shop_id , address , num_of_staff , score , open_year | member : member_id , name , membership_card , age , time_of_purchase , level_of_membership , address | happy_hour : hh_id , shop_id , month , num_of_shaff_in_charge | happy_hour_member : hh_id , member_id , total_amount | happy_hour.shop_id = shop.shop_id | happy_hour_member.member_id = member.member_id | 

### Response:

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

Convert text to sql: Which months have more than 2 happy hours? | shop : shop_id , address , num_of_staff , score , open_year | member : member_id , name , membership_card , age , time_of_purchase , level_of_membership , address | happy_hour : hh_id , shop_id , month , num_of_shaff_in_charge | happy_hour_member : hh_id , member_id , total_amount | happy_hour.shop_id = shop.shop_id | happy_hour_member.member_id = member.member_id | 

### Response:

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

Convert text to sql: How many albums are there? | album : albumid , title , artistid | artist : artistid , name | customer : customerid , firstname , lastname , company , address , city , state , country , postalcode , phone , fax , email , supportrepid | employee : employeeid , lastname , firstname , title , reportsto , birthdate , hiredate , address , city , state , country , postalcode , phone , fax , email | genre : genreid , name | invoice : invoiceid , customerid , invoicedate , billingaddress , billingcity , billingstate , billingcountry , billingpostalcode , total | invoiceline : invoicelineid , invoiceid , trackid , unitprice , quantity | mediatype : mediatypeid , name | playlist : playlistid , name | playlisttrack : playlistid , trackid | track : trackid , name , albumid , mediatypeid , genreid , composer , milliseconds , bytes , unitprice | album.artistid = artist.artistid | customer.supportrepid = employee.employeeid | employee.reportsto = employee.employeeid | invoice.customerid = customer.customerid | invoiceline.trackid = track.trackid | invoiceline.invoiceid = invoice.invoiceid | playlisttrack.trackid = track.trackid | playlisttrack.playlistid = playlist.playlistid | track.mediatypeid = mediatype.mediatypeid | track.genreid = genre.genreid | track.albumid = album.albumid | 

### Response:

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

Convert text to sql: Find the number of albums. | album : albumid , title , artistid | artist : artistid , name | customer : customerid , firstname , lastname , company , address , city , state , country , postalcode , phone , fax , email , supportrepid | employee : employeeid , lastname , firstname , title , reportsto , birthdate , hiredate , address , city , state , country , postalcode , phone , fax , email | genre : genreid , name | invoice : invoiceid , customerid , invoicedate , billingaddress , billingcity , billingstate , billingcountry , billingpostalcode , total | invoiceline : invoicelineid , invoiceid , trackid , unitprice , quantity | mediatype : mediatypeid , name | playlist : playlistid , name | playlisttrack : playlistid , trackid | track : trackid , name , albumid , mediatypeid , genreid , composer , milliseconds , bytes , unitprice | album.artistid = artist.artistid | customer.supportrepid = employee.employeeid | employee.reportsto = employee.employeeid | invoice.customerid = customer.customerid | invoiceline.trackid = track.trackid | invoiceline.invoiceid = invoice.invoiceid | playlisttrack.trackid = track.trackid | playlisttrack.playlistid = playlist.playlistid | track.mediatypeid = mediatype.mediatypeid | track.genreid = genre.genreid | track.albumid = album.albumid | 

### Response:

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

Convert text to sql: List the names of all music genres. | album : albumid , title , artistid | artist : artistid , name | customer : customerid , firstname , lastname , company , address , city , state , country , postalcode , phone , fax , email , supportrepid | employee : employeeid , lastname , firstname , title , reportsto , birthdate , hiredate , address , city , state , country , postalcode , phone , fax , email | genre : genreid , name | invoice : invoiceid , customerid , invoicedate , billingaddress , billingcity , billingstate , billingcountry , billingpostalcode , total | invoiceline : invoicelineid , invoiceid , trackid , unitprice , quantity | mediatype : mediatypeid , name | playlist : playlistid , name | playlisttrack : playlistid , trackid | track : trackid , name , albumid , mediatypeid , genreid , composer , milliseconds , bytes , unitprice | album.artistid = artist.artistid | customer.supportrepid = employee.employeeid | employee.reportsto = employee.employeeid | invoice.customerid = customer.customerid | invoiceline.trackid = track.trackid | invoiceline.invoiceid = invoice.invoiceid | playlisttrack.trackid = track.trackid | playlisttrack.playlistid = playlist.playlistid | track.mediatypeid = mediatype.mediatypeid | track.genreid = genre.genreid | track.albumid = album.albumid | 

### Response:

select _ from _ | select name from genre
### Instruction:

Convert text to sql: What are the names of different music genres? | album : albumid , title , artistid | artist : artistid , name | customer : customerid , firstname , lastname , company , address , city , state , country , postalcode , phone , fax , email , supportrepid | employee : employeeid , lastname , firstname , title , reportsto , birthdate , hiredate , address , city , state , country , postalcode , phone , fax , email | genre : genreid , name | invoice : invoiceid , customerid , invoicedate , billingaddress , billingcity , billingstate , billingcountry , billingpostalcode , total | invoiceline : invoicelineid , invoiceid , trackid , unitprice , quantity | mediatype : mediatypeid , name | playlist : playlistid , name | playlisttrack : playlistid , trackid | track : trackid , name , albumid , mediatypeid , genreid , composer , milliseconds , bytes , unitprice | album.artistid = artist.artistid | customer.supportrepid = employee.employeeid | employee.reportsto = employee.employeeid | invoice.customerid = customer.customerid | invoiceline.trackid = track.trackid | invoiceline.invoiceid = invoice.invoiceid | playlisttrack.trackid = track.trackid | playlisttrack.playlistid = playlist.playlistid | track.mediatypeid = mediatype.mediatypeid | track.genreid = genre.genreid | track.albumid = album.albumid | 

### Response:

select _ from _ | select name from genre
### Instruction:

Convert text to sql: Find all the customer information in state NY. | album : albumid , title , artistid | artist : artistid , name | customer : customerid , firstname , lastname , company , address , city , state , country , postalcode , phone , fax , email , supportrepid | employee : employeeid , lastname , firstname , title , reportsto , birthdate , hiredate , address , city , state , country , postalcode , phone , fax , email | genre : genreid , name | invoice : invoiceid , customerid , invoicedate , billingaddress , billingcity , billingstate , billingcountry , billingpostalcode , total | invoiceline : invoicelineid , invoiceid , trackid , unitprice , quantity | mediatype : mediatypeid , name | playlist : playlistid , name | playlisttrack : playlistid , trackid | track : trackid , name , albumid , mediatypeid , genreid , composer , milliseconds , bytes , unitprice | album.artistid = artist.artistid | customer.supportrepid = employee.employeeid | employee.reportsto = employee.employeeid | invoice.customerid = customer.customerid | invoiceline.trackid = track.trackid | invoiceline.invoiceid = invoice.invoiceid | playlisttrack.trackid = track.trackid | playlisttrack.playlistid = playlist.playlistid | track.mediatypeid = mediatype.mediatypeid | track.genreid = genre.genreid | track.albumid = album.albumid | 

### Response:

select _ from _ where _ | select * from customer where state = 'NY'
### Instruction:

Convert text to sql: What is all the customer information for customers in NY state? | album : albumid , title , artistid | artist : artistid , name | customer : customerid , firstname , lastname , company , address , city , state , country , postalcode , phone , fax , email , supportrepid | employee : employeeid , lastname , firstname , title , reportsto , birthdate , hiredate , address , city , state , country , postalcode , phone , fax , email | genre : genreid , name | invoice : invoiceid , customerid , invoicedate , billingaddress , billingcity , billingstate , billingcountry , billingpostalcode , total | invoiceline : invoicelineid , invoiceid , trackid , unitprice , quantity | mediatype : mediatypeid , name | playlist : playlistid , name | playlisttrack : playlistid , trackid | track : trackid , name , albumid , mediatypeid , genreid , composer , milliseconds , bytes , unitprice | album.artistid = artist.artistid | customer.supportrepid = employee.employeeid | employee.reportsto = employee.employeeid | invoice.customerid = customer.customerid | invoiceline.trackid = track.trackid | invoiceline.invoiceid = invoice.invoiceid | playlisttrack.trackid = track.trackid | playlisttrack.playlistid = playlist.playlistid | track.mediatypeid = mediatype.mediatypeid | track.genreid = genre.genreid | track.albumid = album.albumid | 

### Response:

select _ from _ where _ | select * from customer where state = 'NY'
### Instruction:

Convert text to sql: What are the first names and last names of the employees who live in Calgary city. | album : albumid , title , artistid | artist : artistid , name | customer : customerid , firstname , lastname , company , address , city , state , country , postalcode , phone , fax , email , supportrepid | employee : employeeid , lastname , firstname , title , reportsto , birthdate , hiredate , address , city , state , country , postalcode , phone , fax , email | genre : genreid , name | invoice : invoiceid , customerid , invoicedate , billingaddress , billingcity , billingstate , billingcountry , billingpostalcode , total | invoiceline : invoicelineid , invoiceid , trackid , unitprice , quantity | mediatype : mediatypeid , name | playlist : playlistid , name | playlisttrack : playlistid , trackid | track : trackid , name , albumid , mediatypeid , genreid , composer , milliseconds , bytes , unitprice | album.artistid = artist.artistid | customer.supportrepid = employee.employeeid | employee.reportsto = employee.employeeid | invoice.customerid = customer.customerid | invoiceline.trackid = track.trackid | invoiceline.invoiceid = invoice.invoiceid | playlisttrack.trackid = track.trackid | playlisttrack.playlistid = playlist.playlistid | track.mediatypeid = mediatype.mediatypeid | track.genreid = genre.genreid | track.albumid = album.albumid | 

### Response:

select _ from _ where _ | select firstname , lastname from employee where city = 'Calgary'