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

Convert text to sql: What are the song titles on the album "A Kiss Before You Go: Live in Hamburg"? | songs : songid , title | albums : aid , title , year , label , type | band : id , firstname , lastname | instruments : songid , bandmateid , instrument | performance : songid , bandmate , stageposition | tracklists : albumid , position , songid | vocals : songid , bandmate , type | instruments.bandmateid = band.id | instruments.songid = songs.songid | performance.bandmate = band.id | performance.songid = songs.songid | tracklists.albumid = albums.aid | tracklists.songid = songs.songid | vocals.bandmate = band.id | vocals.songid = songs.songid | 

### Response:

select songs.title from albums join tracklists on albums.aid = tracklists.albumid join songs on tracklists.songid = songs.songid where albums.title = 'A Kiss Before You Go: Live in Hamburg'

### Instruction:

Convert text to sql: What are all the songs in albums under label "Universal Music Group"? | songs : songid , title | albums : aid , title , year , label , type | band : id , firstname , lastname | instruments : songid , bandmateid , instrument | performance : songid , bandmate , stageposition | tracklists : albumid , position , songid | vocals : songid , bandmate , type | instruments.bandmateid = band.id | instruments.songid = songs.songid | performance.bandmate = band.id | performance.songid = songs.songid | tracklists.albumid = albums.aid | tracklists.songid = songs.songid | vocals.bandmate = band.id | vocals.songid = songs.songid | 

### Response:

select songs.title from albums join tracklists on albums.aid = tracklists.albumid join songs on tracklists.songid = songs.songid where albums.label = 'Universal Music Group'

### Instruction:

Convert text to sql: What are the names of all the songs whose album is under the label of "Universal Music Group"? | songs : songid , title | albums : aid , title , year , label , type | band : id , firstname , lastname | instruments : songid , bandmateid , instrument | performance : songid , bandmate , stageposition | tracklists : albumid , position , songid | vocals : songid , bandmate , type | instruments.bandmateid = band.id | instruments.songid = songs.songid | performance.bandmate = band.id | performance.songid = songs.songid | tracklists.albumid = albums.aid | tracklists.songid = songs.songid | vocals.bandmate = band.id | vocals.songid = songs.songid | 

### Response:

select songs.title from albums join tracklists on albums.aid = tracklists.albumid join songs on tracklists.songid = songs.songid where albums.label = 'Universal Music Group'
### Instruction:

Convert text to sql: Find the number of songs in all the studio albums. | songs : songid , title | albums : aid , title , year , label , type | band : id , firstname , lastname | instruments : songid , bandmateid , instrument | performance : songid , bandmate , stageposition | tracklists : albumid , position , songid | vocals : songid , bandmate , type | instruments.bandmateid = band.id | instruments.songid = songs.songid | performance.bandmate = band.id | performance.songid = songs.songid | tracklists.albumid = albums.aid | tracklists.songid = songs.songid | vocals.bandmate = band.id | vocals.songid = songs.songid | 

### Response:

select count ( distinct songs.title ) from albums join tracklists on albums.aid = tracklists.albumid join songs on tracklists.songid = songs.songid where albums.type = 'Studio'

### Instruction:

Convert text to sql: How many songs appear in studio albums? | songs : songid , title | albums : aid , title , year , label , type | band : id , firstname , lastname | instruments : songid , bandmateid , instrument | performance : songid , bandmate , stageposition | tracklists : albumid , position , songid | vocals : songid , bandmate , type | instruments.bandmateid = band.id | instruments.songid = songs.songid | performance.bandmate = band.id | performance.songid = songs.songid | tracklists.albumid = albums.aid | tracklists.songid = songs.songid | vocals.bandmate = band.id | vocals.songid = songs.songid | 

### Response:

select count ( distinct songs.title ) from albums join tracklists on albums.aid = tracklists.albumid join songs on tracklists.songid = songs.songid where albums.type = 'Studio'
### Instruction:

Convert text to sql: Who is the founder of Sony? | manufacturers : code , name , headquarter , founder , revenue | products : code , name , price , manufacturer | products.manufacturer = manufacturers.code | 

### Response:

select founder from manufacturers where name = 'Sony'

### Instruction:

Convert text to sql: Return the founder of Sony. | manufacturers : code , name , headquarter , founder , revenue | products : code , name , price , manufacturer | products.manufacturer = manufacturers.code | 

### Response:

select founder from manufacturers where name = 'Sony'

### Instruction:

Convert text to sql: Where is the headquarter of the company founded by James? | manufacturers : code , name , headquarter , founder , revenue | products : code , name , price , manufacturer | products.manufacturer = manufacturers.code | 

### Response:

select headquarter from manufacturers where founder = 'James'

### Instruction:

Convert text to sql: What is the headquarter of the company whose founder is James? | manufacturers : code , name , headquarter , founder , revenue | products : code , name , price , manufacturer | products.manufacturer = manufacturers.code | 

### Response:

select headquarter from manufacturers where founder = 'James'

### Instruction:

Convert text to sql: Find all manufacturers' names and their headquarters, sorted by the ones with highest revenue first. | manufacturers : code , name , headquarter , founder , revenue | products : code , name , price , manufacturer | products.manufacturer = manufacturers.code | 

### Response:

select name , headquarter from manufacturers order by revenue desc

### Instruction:

Convert text to sql: What are the names and headquarters of all manufacturers, ordered by revenue descending? | manufacturers : code , name , headquarter , founder , revenue | products : code , name , price , manufacturer | products.manufacturer = manufacturers.code | 

### Response:

select name , headquarter from manufacturers order by revenue desc

### Instruction:

Convert text to sql: What are the average, maximum and total revenues of all companies? | manufacturers : code , name , headquarter , founder , revenue | products : code , name , price , manufacturer | products.manufacturer = manufacturers.code | 

### Response:

select avg ( revenue ) , max ( revenue ) , sum ( revenue ) from manufacturers

### Instruction:

Convert text to sql: Return the average, maximum, and total revenues across all manufacturers. | manufacturers : code , name , headquarter , founder , revenue | products : code , name , price , manufacturer | products.manufacturer = manufacturers.code | 

### Response:

select avg ( revenue ) , max ( revenue ) , sum ( revenue ) from manufacturers

### Instruction:

Convert text to sql: How many companies were created by Andy? | manufacturers : code , name , headquarter , founder , revenue | products : code , name , price , manufacturer | products.manufacturer = manufacturers.code | 

### Response:

select count ( * ) from manufacturers where founder = 'Andy'
### Instruction:

Convert text to sql: Return the number of companies created by Andy. | manufacturers : code , name , headquarter , founder , revenue | products : code , name , price , manufacturer | products.manufacturer = manufacturers.code | 

### Response:

select count ( * ) from manufacturers where founder = 'Andy'

### Instruction:

Convert text to sql: Find the total revenue created by the companies whose headquarter is located at Austin. | manufacturers : code , name , headquarter , founder , revenue | products : code , name , price , manufacturer | products.manufacturer = manufacturers.code | 

### Response:

select sum ( revenue ) from manufacturers where headquarter = 'Austin'

### Instruction:

Convert text to sql: What is the sum of revenue from companies with headquarters in Austin? | manufacturers : code , name , headquarter , founder , revenue | products : code , name , price , manufacturer | products.manufacturer = manufacturers.code | 

### Response:

select sum ( revenue ) from manufacturers where headquarter = 'Austin'

### Instruction:

Convert text to sql: What are the different cities listed? | manufacturers : code , name , headquarter , founder , revenue | products : code , name , price , manufacturer | products.manufacturer = manufacturers.code | 

### Response:

select distinct headquarter from manufacturers

### Instruction:

Convert text to sql: Give the distinct headquarters of manufacturers. | manufacturers : code , name , headquarter , founder , revenue | products : code , name , price , manufacturer | products.manufacturer = manufacturers.code | 

### Response:

select distinct headquarter from manufacturers

### Instruction:

Convert text to sql: Find the number of manufactures that are based in Tokyo or Beijing. | manufacturers : code , name , headquarter , founder , revenue | products : code , name , price , manufacturer | products.manufacturer = manufacturers.code | 

### Response:

select count ( * ) from manufacturers where headquarter = 'Tokyo' or headquarter = 'Beijing'

### Instruction:

Convert text to sql: How many manufacturers have headquarters in either Tokyo or Beijing? | manufacturers : code , name , headquarter , founder , revenue | products : code , name , price , manufacturer | products.manufacturer = manufacturers.code | 

### Response:

select count ( * ) from manufacturers where headquarter = 'Tokyo' or headquarter = 'Beijing'

### Instruction:

Convert text to sql: Find the founder of the company whose name begins with the letter 'S'. | manufacturers : code , name , headquarter , founder , revenue | products : code , name , price , manufacturer | products.manufacturer = manufacturers.code | 

### Response:

select founder from manufacturers where name like 'S%'

### Instruction:

Convert text to sql: Who is the founders of companies whose first letter is S? | manufacturers : code , name , headquarter , founder , revenue | products : code , name , price , manufacturer | products.manufacturer = manufacturers.code | 

### Response:

select founder from manufacturers where name like 'S%'
### Instruction:

Convert text to sql: Find the name of companies whose revenue is between 100 and 150. | manufacturers : code , name , headquarter , founder , revenue | products : code , name , price , manufacturer | products.manufacturer = manufacturers.code | 

### Response:

select name from manufacturers where revenue between 100 and 150

### Instruction:

Convert text to sql: What are the names of companies with revenue between 100 and 150? | manufacturers : code , name , headquarter , founder , revenue | products : code , name , price , manufacturer | products.manufacturer = manufacturers.code | 

### Response:

select name from manufacturers where revenue between 100 and 150

### Instruction:

Convert text to sql: What is the total revenue of all companies whose main office is at Tokyo or Taiwan? | manufacturers : code , name , headquarter , founder , revenue | products : code , name , price , manufacturer | products.manufacturer = manufacturers.code | 

### Response:

select sum ( revenue ) from manufacturers where headquarter = 'Tokyo' or headquarter = 'Taiwan'

### Instruction:

Convert text to sql: Return the total revenue of companies with headquarters in Tokyo or Taiwan. | manufacturers : code , name , headquarter , founder , revenue | products : code , name , price , manufacturer | products.manufacturer = manufacturers.code | 

### Response:

select sum ( revenue ) from manufacturers where headquarter = 'Tokyo' or headquarter = 'Taiwan'

### Instruction:

Convert text to sql: Find the name of product that is produced by both companies Creative Labs and Sony. | manufacturers : code , name , headquarter , founder , revenue | products : code , name , price , manufacturer | products.manufacturer = manufacturers.code | 

### Response:

select products.name from products join manufacturers on products.manufacturer = manufacturers.code where manufacturers.name = 'Creative Labs' intersect select products.name from products join manufacturers on products.manufacturer = manufacturers.code where manufacturers.name = 'Sony'

### Instruction:

Convert text to sql: What are the names of products produced by both Creative Labs and Sony? | manufacturers : code , name , headquarter , founder , revenue | products : code , name , price , manufacturer | products.manufacturer = manufacturers.code | 

### Response:

select products.name from products join manufacturers on products.manufacturer = manufacturers.code where manufacturers.name = 'Creative Labs' intersect select products.name from products join manufacturers on products.manufacturer = manufacturers.code where manufacturers.name = 'Sony'

### Instruction:

Convert text to sql: Find the name, headquarter and founder of the manufacturer that has the highest revenue. | manufacturers : code , name , headquarter , founder , revenue | products : code , name , price , manufacturer | products.manufacturer = manufacturers.code | 

### Response:

select name , headquarter , founder from manufacturers order by revenue desc limit 1
### Instruction:

Convert text to sql: What are the names, headquarters and founders of the company with the highest revenue? | manufacturers : code , name , headquarter , founder , revenue | products : code , name , price , manufacturer | products.manufacturer = manufacturers.code | 

### Response:

select name , headquarter , founder from manufacturers order by revenue desc limit 1

### Instruction:

Convert text to sql: Find the name, headquarter and revenue of all manufacturers sorted by their revenue in the descending order. | manufacturers : code , name , headquarter , founder , revenue | products : code , name , price , manufacturer | products.manufacturer = manufacturers.code | 

### Response:

select name , headquarter , revenue from manufacturers order by revenue desc

### Instruction:

Convert text to sql: What are the names, headquarters and revenues for manufacturers, sorted by revenue descending? | manufacturers : code , name , headquarter , founder , revenue | products : code , name , price , manufacturer | products.manufacturer = manufacturers.code | 

### Response:

select name , headquarter , revenue from manufacturers order by revenue desc

### Instruction:

Convert text to sql: Find the name of companies whose revenue is greater than the average revenue of all companies. | manufacturers : code , name , headquarter , founder , revenue | products : code , name , price , manufacturer | products.manufacturer = manufacturers.code | 

### Response:

select name from manufacturers where revenue > ( select avg ( revenue ) from manufacturers )

### Instruction:

Convert text to sql: What are the names of manufacturers with revenue greater than the average of all revenues? | manufacturers : code , name , headquarter , founder , revenue | products : code , name , price , manufacturer | products.manufacturer = manufacturers.code | 

### Response:

select name from manufacturers where revenue > ( select avg ( revenue ) from manufacturers )

### Instruction:

Convert text to sql: Find the name of companies whose revenue is smaller than the revenue of all companies based in Austin. | manufacturers : code , name , headquarter , founder , revenue | products : code , name , price , manufacturer | products.manufacturer = manufacturers.code | 

### Response:

select name from manufacturers where revenue < ( select min ( revenue ) from manufacturers where headquarter = 'Austin' )

### Instruction:

Convert text to sql: What are the names of companies with revenue less than the lowest revenue of any manufacturer in Austin? | manufacturers : code , name , headquarter , founder , revenue | products : code , name , price , manufacturer | products.manufacturer = manufacturers.code | 

### Response:

select name from manufacturers where revenue < ( select min ( revenue ) from manufacturers where headquarter = 'Austin' )
### Instruction:

Convert text to sql: Find the total revenue of companies whose revenue is larger than the revenue of some companies based in Austin. | manufacturers : code , name , headquarter , founder , revenue | products : code , name , price , manufacturer | products.manufacturer = manufacturers.code | 

### Response:

select sum ( revenue ) from manufacturers where revenue > ( select min ( revenue ) from manufacturers where headquarter = 'Austin' )

### Instruction:

Convert text to sql: What is the total revenue of companies with revenue greater than the lowest revenue of any manufacturer in Austin? | manufacturers : code , name , headquarter , founder , revenue | products : code , name , price , manufacturer | products.manufacturer = manufacturers.code | 

### Response:

select sum ( revenue ) from manufacturers where revenue > ( select min ( revenue ) from manufacturers where headquarter = 'Austin' )

### Instruction:

Convert text to sql: Find the total revenue of companies of each founder. | manufacturers : code , name , headquarter , founder , revenue | products : code , name , price , manufacturer | products.manufacturer = manufacturers.code | 

### Response:

select sum ( revenue ) , founder from manufacturers group by founder

### Instruction:

Convert text to sql: What is the total revenue of companies started by founder? | manufacturers : code , name , headquarter , founder , revenue | products : code , name , price , manufacturer | products.manufacturer = manufacturers.code | 

### Response:

select sum ( revenue ) , founder from manufacturers group by founder

### Instruction:

Convert text to sql: Find the name and revenue of the company that earns the highest revenue in each city. | manufacturers : code , name , headquarter , founder , revenue | products : code , name , price , manufacturer | products.manufacturer = manufacturers.code | 

### Response:

select name , max ( revenue ) , headquarter from manufacturers group by headquarter

### Instruction:

Convert text to sql: What are the names and revenues of the companies with the highest revenues in each headquarter city? | manufacturers : code , name , headquarter , founder , revenue | products : code , name , price , manufacturer | products.manufacturer = manufacturers.code | 

### Response:

select name , max ( revenue ) , headquarter from manufacturers group by headquarter

### Instruction:

Convert text to sql: Find the total revenue for each manufacturer. | manufacturers : code , name , headquarter , founder , revenue | products : code , name , price , manufacturer | products.manufacturer = manufacturers.code | 

### Response:

select sum ( revenue ) , name from manufacturers group by name

### Instruction:

Convert text to sql: What is the total revenue of each manufacturer? | manufacturers : code , name , headquarter , founder , revenue | products : code , name , price , manufacturer | products.manufacturer = manufacturers.code | 

### Response:

select sum ( revenue ) , name from manufacturers group by name
### Instruction:

Convert text to sql: Find the average prices of all products from each manufacture, and list each company's name. | manufacturers : code , name , headquarter , founder , revenue | products : code , name , price , manufacturer | products.manufacturer = manufacturers.code | 

### Response:

select avg ( products.price ) , manufacturers.name from products join manufacturers on products.manufacturer = manufacturers.code group by manufacturers.name

### Instruction:

Convert text to sql: What are the average prices of products for each manufacturer? | manufacturers : code , name , headquarter , founder , revenue | products : code , name , price , manufacturer | products.manufacturer = manufacturers.code | 

### Response:

select avg ( products.price ) , manufacturers.name from products join manufacturers on products.manufacturer = manufacturers.code group by manufacturers.name

### Instruction:

Convert text to sql: Find the number of different products that are produced by companies at different headquarter cities. | manufacturers : code , name , headquarter , founder , revenue | products : code , name , price , manufacturer | products.manufacturer = manufacturers.code | 

### Response:

select count ( distinct products.name ) , manufacturers.headquarter from products join manufacturers on products.manufacturer = manufacturers.code group by manufacturers.headquarter

### Instruction:

Convert text to sql: How many different products are produced in each headquarter city? | manufacturers : code , name , headquarter , founder , revenue | products : code , name , price , manufacturer | products.manufacturer = manufacturers.code | 

### Response:

select count ( distinct products.name ) , manufacturers.headquarter from products join manufacturers on products.manufacturer = manufacturers.code group by manufacturers.headquarter

### Instruction:

Convert text to sql: Find number of products which Sony does not make. | manufacturers : code , name , headquarter , founder , revenue | products : code , name , price , manufacturer | products.manufacturer = manufacturers.code | 

### Response:

select count ( distinct name ) from products where name not in ( select products.name from products join manufacturers on products.manufacturer = manufacturers.code where manufacturers.name = 'Sony' )

### Instruction:

Convert text to sql: How many products are not made by Sony? | manufacturers : code , name , headquarter , founder , revenue | products : code , name , price , manufacturer | products.manufacturer = manufacturers.code | 

### Response:

select count ( distinct name ) from products where name not in ( select products.name from products join manufacturers on products.manufacturer = manufacturers.code where manufacturers.name = 'Sony' )