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

Convert text to sql: What is the maximum Online Mendelian Inheritance in Man (OMIM) value of the enzymes? | medicine : id , name , trade_name , fda_approved | enzyme : id , name , location , product , chromosome , omim , porphyria | medicine_enzyme_interaction : enzyme_id , medicine_id , interaction_type | medicine_enzyme_interaction.medicine_id = medicine.id | medicine_enzyme_interaction.enzyme_id = enzyme.id | 

### Response:

select max ( omim ) from enzyme

### Instruction:

Convert text to sql: What is the maximum OMIM value in the database? | medicine : id , name , trade_name , fda_approved | enzyme : id , name , location , product , chromosome , omim , porphyria | medicine_enzyme_interaction : enzyme_id , medicine_id , interaction_type | medicine_enzyme_interaction.medicine_id = medicine.id | medicine_enzyme_interaction.enzyme_id = enzyme.id | 

### Response:

select max ( omim ) from enzyme

### Instruction:

Convert text to sql: What is the product, chromosome and porphyria related to the enzymes which take effect at the location 'Cytosol'? | medicine : id , name , trade_name , fda_approved | enzyme : id , name , location , product , chromosome , omim , porphyria | medicine_enzyme_interaction : enzyme_id , medicine_id , interaction_type | medicine_enzyme_interaction.medicine_id = medicine.id | medicine_enzyme_interaction.enzyme_id = enzyme.id | 

### Response:

select product , chromosome , porphyria from enzyme where location = 'Cytosol'

### Instruction:

Convert text to sql: What is the product, chromosome, and porphyria of the enzymes located at 'Cytosol'? | medicine : id , name , trade_name , fda_approved | enzyme : id , name , location , product , chromosome , omim , porphyria | medicine_enzyme_interaction : enzyme_id , medicine_id , interaction_type | medicine_enzyme_interaction.medicine_id = medicine.id | medicine_enzyme_interaction.enzyme_id = enzyme.id | 

### Response:

select product , chromosome , porphyria from enzyme where location = 'Cytosol'

### Instruction:

Convert text to sql: What are the names of enzymes who does not produce 'Heme'? | medicine : id , name , trade_name , fda_approved | enzyme : id , name , location , product , chromosome , omim , porphyria | medicine_enzyme_interaction : enzyme_id , medicine_id , interaction_type | medicine_enzyme_interaction.medicine_id = medicine.id | medicine_enzyme_interaction.enzyme_id = enzyme.id | 

### Response:

select name from enzyme where product != 'Heme'

### Instruction:

Convert text to sql: What are the names of enzymes whose product is not 'Heme'? | medicine : id , name , trade_name , fda_approved | enzyme : id , name , location , product , chromosome , omim , porphyria | medicine_enzyme_interaction : enzyme_id , medicine_id , interaction_type | medicine_enzyme_interaction.medicine_id = medicine.id | medicine_enzyme_interaction.enzyme_id = enzyme.id | 

### Response:

select name from enzyme where product != 'Heme'
### Instruction:

Convert text to sql: What are the names and trade names of the medicines which has 'Yes' value in the FDA record? | medicine : id , name , trade_name , fda_approved | enzyme : id , name , location , product , chromosome , omim , porphyria | medicine_enzyme_interaction : enzyme_id , medicine_id , interaction_type | medicine_enzyme_interaction.medicine_id = medicine.id | medicine_enzyme_interaction.enzyme_id = enzyme.id | 

### Response:

select name , trade_name from medicine where fda_approved = 'Yes'

### Instruction:

Convert text to sql: What are the names and trade names of the medcines that are FDA approved? | medicine : id , name , trade_name , fda_approved | enzyme : id , name , location , product , chromosome , omim , porphyria | medicine_enzyme_interaction : enzyme_id , medicine_id , interaction_type | medicine_enzyme_interaction.medicine_id = medicine.id | medicine_enzyme_interaction.enzyme_id = enzyme.id | 

### Response:

select name , trade_name from medicine where fda_approved = 'Yes'

### Instruction:

Convert text to sql: What are the names of enzymes in the medicine named 'Amisulpride' that can serve as an 'inhibitor'? | medicine : id , name , trade_name , fda_approved | enzyme : id , name , location , product , chromosome , omim , porphyria | medicine_enzyme_interaction : enzyme_id , medicine_id , interaction_type | medicine_enzyme_interaction.medicine_id = medicine.id | medicine_enzyme_interaction.enzyme_id = enzyme.id | 

### Response:

select enzyme.name from enzyme join medicine_enzyme_interaction on enzyme.id = medicine_enzyme_interaction.enzyme_id join medicine on medicine_enzyme_interaction.medicine_id = medicine.id where medicine.name = 'Amisulpride' and medicine_enzyme_interaction.interaction_type = 'inhibitor'

### Instruction:

Convert text to sql: What are the names of the enzymes used in the medicine  Amisulpride that acts as inhibitors? | medicine : id , name , trade_name , fda_approved | enzyme : id , name , location , product , chromosome , omim , porphyria | medicine_enzyme_interaction : enzyme_id , medicine_id , interaction_type | medicine_enzyme_interaction.medicine_id = medicine.id | medicine_enzyme_interaction.enzyme_id = enzyme.id | 

### Response:

select enzyme.name from enzyme join medicine_enzyme_interaction on enzyme.id = medicine_enzyme_interaction.enzyme_id join medicine on medicine_enzyme_interaction.medicine_id = medicine.id where medicine.name = 'Amisulpride' and medicine_enzyme_interaction.interaction_type = 'inhibitor'

### Instruction:

Convert text to sql: What are the ids and names of the medicine that can interact with two or more enzymes? | medicine : id , name , trade_name , fda_approved | enzyme : id , name , location , product , chromosome , omim , porphyria | medicine_enzyme_interaction : enzyme_id , medicine_id , interaction_type | medicine_enzyme_interaction.medicine_id = medicine.id | medicine_enzyme_interaction.enzyme_id = enzyme.id | 

### Response:

select medicine.id , medicine.name from medicine join medicine_enzyme_interaction on medicine_enzyme_interaction.medicine_id = medicine.id group by medicine.id having count ( * ) >= 2
### Instruction:

Convert text to sql: For every medicine id, what are the names of the medicines that can interact with more than one enzyme? | medicine : id , name , trade_name , fda_approved | enzyme : id , name , location , product , chromosome , omim , porphyria | medicine_enzyme_interaction : enzyme_id , medicine_id , interaction_type | medicine_enzyme_interaction.medicine_id = medicine.id | medicine_enzyme_interaction.enzyme_id = enzyme.id | 

### Response:

select medicine.id , medicine.name from medicine join medicine_enzyme_interaction on medicine_enzyme_interaction.medicine_id = medicine.id group by medicine.id having count ( * ) >= 2

### Instruction:

Convert text to sql: What are the ids, names and FDA approval status of medicines in descending order of the number of enzymes that it can interact with. | medicine : id , name , trade_name , fda_approved | enzyme : id , name , location , product , chromosome , omim , porphyria | medicine_enzyme_interaction : enzyme_id , medicine_id , interaction_type | medicine_enzyme_interaction.medicine_id = medicine.id | medicine_enzyme_interaction.enzyme_id = enzyme.id | 

### Response:

select medicine.id , medicine.name , medicine.fda_approved from medicine join medicine_enzyme_interaction on medicine_enzyme_interaction.medicine_id = medicine.id group by medicine.id order by count ( * ) desc

### Instruction:

Convert text to sql: What are the ids, names, and FDA approval status for medicines ordered by descending number of possible enzyme interactions? | medicine : id , name , trade_name , fda_approved | enzyme : id , name , location , product , chromosome , omim , porphyria | medicine_enzyme_interaction : enzyme_id , medicine_id , interaction_type | medicine_enzyme_interaction.medicine_id = medicine.id | medicine_enzyme_interaction.enzyme_id = enzyme.id | 

### Response:

select medicine.id , medicine.name , medicine.fda_approved from medicine join medicine_enzyme_interaction on medicine_enzyme_interaction.medicine_id = medicine.id group by medicine.id order by count ( * ) desc

### Instruction:

Convert text to sql: What is the id and name of the enzyme with most number of medicines that can interact as 'activator'? | medicine : id , name , trade_name , fda_approved | enzyme : id , name , location , product , chromosome , omim , porphyria | medicine_enzyme_interaction : enzyme_id , medicine_id , interaction_type | medicine_enzyme_interaction.medicine_id = medicine.id | medicine_enzyme_interaction.enzyme_id = enzyme.id | 

### Response:

select enzyme.id , enzyme.name from enzyme join medicine_enzyme_interaction on enzyme.id = medicine_enzyme_interaction.enzyme_id where medicine_enzyme_interaction.interaction_type = 'activitor' group by enzyme.id order by count ( * ) desc limit 1
### Instruction:

Convert text to sql: What is the id and name of the enzyme that can interact with the most medicines as an activator? | medicine : id , name , trade_name , fda_approved | enzyme : id , name , location , product , chromosome , omim , porphyria | medicine_enzyme_interaction : enzyme_id , medicine_id , interaction_type | medicine_enzyme_interaction.medicine_id = medicine.id | medicine_enzyme_interaction.enzyme_id = enzyme.id | 

### Response:

select enzyme.id , enzyme.name from enzyme join medicine_enzyme_interaction on enzyme.id = medicine_enzyme_interaction.enzyme_id where medicine_enzyme_interaction.interaction_type = 'activitor' group by enzyme.id order by count ( * ) desc limit 1

### Instruction:

Convert text to sql: What is the interaction type of the enzyme named 'ALA synthase' and the medicine named 'Aripiprazole'? | medicine : id , name , trade_name , fda_approved | enzyme : id , name , location , product , chromosome , omim , porphyria | medicine_enzyme_interaction : enzyme_id , medicine_id , interaction_type | medicine_enzyme_interaction.medicine_id = medicine.id | medicine_enzyme_interaction.enzyme_id = enzyme.id | 

### Response:

select medicine_enzyme_interaction.interaction_type from medicine_enzyme_interaction join medicine on medicine_enzyme_interaction.medicine_id = medicine.id join enzyme on medicine_enzyme_interaction.enzyme_id = enzyme.id where enzyme.name = 'ALA synthase' and medicine.name = 'Aripiprazole'

### Instruction:

Convert text to sql: What is the type of interaction for the enzyme named 'ALA synthase' and the medicine named 'Aripiprazole'? | medicine : id , name , trade_name , fda_approved | enzyme : id , name , location , product , chromosome , omim , porphyria | medicine_enzyme_interaction : enzyme_id , medicine_id , interaction_type | medicine_enzyme_interaction.medicine_id = medicine.id | medicine_enzyme_interaction.enzyme_id = enzyme.id | 

### Response:

select medicine_enzyme_interaction.interaction_type from medicine_enzyme_interaction join medicine on medicine_enzyme_interaction.medicine_id = medicine.id join enzyme on medicine_enzyme_interaction.enzyme_id = enzyme.id where enzyme.name = 'ALA synthase' and medicine.name = 'Aripiprazole'

### Instruction:

Convert text to sql: What is the most common interaction type between enzymes and medicine? And how many are there? | medicine : id , name , trade_name , fda_approved | enzyme : id , name , location , product , chromosome , omim , porphyria | medicine_enzyme_interaction : enzyme_id , medicine_id , interaction_type | medicine_enzyme_interaction.medicine_id = medicine.id | medicine_enzyme_interaction.enzyme_id = enzyme.id | 

### Response:

select interaction_type , count ( * ) from medicine_enzyme_interaction group by interaction_type order by count ( * ) desc limit 1
### Instruction:

Convert text to sql: What are the most common types of interactions between enzymes and medicine, and how many types are there? | medicine : id , name , trade_name , fda_approved | enzyme : id , name , location , product , chromosome , omim , porphyria | medicine_enzyme_interaction : enzyme_id , medicine_id , interaction_type | medicine_enzyme_interaction.medicine_id = medicine.id | medicine_enzyme_interaction.enzyme_id = enzyme.id | 

### Response:

select interaction_type , count ( * ) from medicine_enzyme_interaction group by interaction_type order by count ( * ) desc limit 1

### Instruction:

Convert text to sql: How many medicines have the FDA approval status 'No' ? | medicine : id , name , trade_name , fda_approved | enzyme : id , name , location , product , chromosome , omim , porphyria | medicine_enzyme_interaction : enzyme_id , medicine_id , interaction_type | medicine_enzyme_interaction.medicine_id = medicine.id | medicine_enzyme_interaction.enzyme_id = enzyme.id | 

### Response:

select count ( * ) from medicine where fda_approved = 'No'

### Instruction:

Convert text to sql: How many medicines were not approved by the FDA? | medicine : id , name , trade_name , fda_approved | enzyme : id , name , location , product , chromosome , omim , porphyria | medicine_enzyme_interaction : enzyme_id , medicine_id , interaction_type | medicine_enzyme_interaction.medicine_id = medicine.id | medicine_enzyme_interaction.enzyme_id = enzyme.id | 

### Response:

select count ( * ) from medicine where fda_approved = 'No'

### Instruction:

Convert text to sql: How many enzymes do not have any interactions? | medicine : id , name , trade_name , fda_approved | enzyme : id , name , location , product , chromosome , omim , porphyria | medicine_enzyme_interaction : enzyme_id , medicine_id , interaction_type | medicine_enzyme_interaction.medicine_id = medicine.id | medicine_enzyme_interaction.enzyme_id = enzyme.id | 

### Response:

select count ( * ) from enzyme where id not in ( select enzyme_id from medicine_enzyme_interaction )

### Instruction:

Convert text to sql: What is the count of enzymes without any interactions? | medicine : id , name , trade_name , fda_approved | enzyme : id , name , location , product , chromosome , omim , porphyria | medicine_enzyme_interaction : enzyme_id , medicine_id , interaction_type | medicine_enzyme_interaction.medicine_id = medicine.id | medicine_enzyme_interaction.enzyme_id = enzyme.id | 

### Response:

select count ( * ) from enzyme where id not in ( select enzyme_id from medicine_enzyme_interaction )
### Instruction:

Convert text to sql: What is the id and trade name of the medicines can interact with at least 3 enzymes? | medicine : id , name , trade_name , fda_approved | enzyme : id , name , location , product , chromosome , omim , porphyria | medicine_enzyme_interaction : enzyme_id , medicine_id , interaction_type | medicine_enzyme_interaction.medicine_id = medicine.id | medicine_enzyme_interaction.enzyme_id = enzyme.id | 

### Response:

select medicine.id , medicine.trade_name from medicine join medicine_enzyme_interaction on medicine_enzyme_interaction.medicine_id = medicine.id group by medicine.id having count ( * ) >= 3

### Instruction:

Convert text to sql: What are the ids and trade names of the medicine that can interact with at least 3 enzymes? | medicine : id , name , trade_name , fda_approved | enzyme : id , name , location , product , chromosome , omim , porphyria | medicine_enzyme_interaction : enzyme_id , medicine_id , interaction_type | medicine_enzyme_interaction.medicine_id = medicine.id | medicine_enzyme_interaction.enzyme_id = enzyme.id | 

### Response:

select medicine.id , medicine.trade_name from medicine join medicine_enzyme_interaction on medicine_enzyme_interaction.medicine_id = medicine.id group by medicine.id having count ( * ) >= 3

### Instruction:

Convert text to sql: What are the distinct name, location and products of the enzymes which has any 'inhibitor' interaction? | medicine : id , name , trade_name , fda_approved | enzyme : id , name , location , product , chromosome , omim , porphyria | medicine_enzyme_interaction : enzyme_id , medicine_id , interaction_type | medicine_enzyme_interaction.medicine_id = medicine.id | medicine_enzyme_interaction.enzyme_id = enzyme.id | 

### Response:

select distinct enzyme.name , enzyme.location , enzyme.product from enzyme join medicine_enzyme_interaction on medicine_enzyme_interaction.enzyme_id = enzyme.id where medicine_enzyme_interaction.interaction_type = 'inhibitor'

### Instruction:

Convert text to sql: What are the different names, locations, and products of the enzymes that are capable inhibitor interactions? | medicine : id , name , trade_name , fda_approved | enzyme : id , name , location , product , chromosome , omim , porphyria | medicine_enzyme_interaction : enzyme_id , medicine_id , interaction_type | medicine_enzyme_interaction.medicine_id = medicine.id | medicine_enzyme_interaction.enzyme_id = enzyme.id | 

### Response:

select distinct enzyme.name , enzyme.location , enzyme.product from enzyme join medicine_enzyme_interaction on medicine_enzyme_interaction.enzyme_id = enzyme.id where medicine_enzyme_interaction.interaction_type = 'inhibitor'
### Instruction:

Convert text to sql: List the medicine name and trade name which can both interact as 'inhibitor' and 'activitor' with enzymes. | medicine : id , name , trade_name , fda_approved | enzyme : id , name , location , product , chromosome , omim , porphyria | medicine_enzyme_interaction : enzyme_id , medicine_id , interaction_type | medicine_enzyme_interaction.medicine_id = medicine.id | medicine_enzyme_interaction.enzyme_id = enzyme.id | 

### Response:

select medicine.name , medicine.trade_name from medicine join medicine_enzyme_interaction on medicine_enzyme_interaction.medicine_id = medicine.id where interaction_type = 'inhibitor' intersect select medicine.name , medicine.trade_name from medicine join medicine_enzyme_interaction on medicine_enzyme_interaction.medicine_id = medicine.id where interaction_type = 'activitor'

### Instruction:

Convert text to sql: What are the medicine and trade names that can interact as an inhibitor and activitor with enzymes? | medicine : id , name , trade_name , fda_approved | enzyme : id , name , location , product , chromosome , omim , porphyria | medicine_enzyme_interaction : enzyme_id , medicine_id , interaction_type | medicine_enzyme_interaction.medicine_id = medicine.id | medicine_enzyme_interaction.enzyme_id = enzyme.id | 

### Response:

select medicine.name , medicine.trade_name from medicine join medicine_enzyme_interaction on medicine_enzyme_interaction.medicine_id = medicine.id where interaction_type = 'inhibitor' intersect select medicine.name , medicine.trade_name from medicine join medicine_enzyme_interaction on medicine_enzyme_interaction.medicine_id = medicine.id where interaction_type = 'activitor'

### Instruction:

Convert text to sql: Show the medicine names and trade names that cannot interact with the enzyme with product 'Heme'. | medicine : id , name , trade_name , fda_approved | enzyme : id , name , location , product , chromosome , omim , porphyria | medicine_enzyme_interaction : enzyme_id , medicine_id , interaction_type | medicine_enzyme_interaction.medicine_id = medicine.id | medicine_enzyme_interaction.enzyme_id = enzyme.id | 

### Response:

select name , trade_name from medicine except select medicine.name , medicine.trade_name from medicine join medicine_enzyme_interaction on medicine_enzyme_interaction.medicine_id = medicine.id join enzyme on enzyme.id = medicine_enzyme_interaction.enzyme_id where enzyme.product = 'Protoporphyrinogen IX'
### Instruction:

Convert text to sql: What are the medicine and trade names that cannot interact with the enzyme with the product 'Heme'? | medicine : id , name , trade_name , fda_approved | enzyme : id , name , location , product , chromosome , omim , porphyria | medicine_enzyme_interaction : enzyme_id , medicine_id , interaction_type | medicine_enzyme_interaction.medicine_id = medicine.id | medicine_enzyme_interaction.enzyme_id = enzyme.id | 

### Response:

select name , trade_name from medicine except select medicine.name , medicine.trade_name from medicine join medicine_enzyme_interaction on medicine_enzyme_interaction.medicine_id = medicine.id join enzyme on enzyme.id = medicine_enzyme_interaction.enzyme_id where enzyme.product = 'Protoporphyrinogen IX'

### Instruction:

Convert text to sql: How many distinct FDA approval statuses are there for the medicines? | medicine : id , name , trade_name , fda_approved | enzyme : id , name , location , product , chromosome , omim , porphyria | medicine_enzyme_interaction : enzyme_id , medicine_id , interaction_type | medicine_enzyme_interaction.medicine_id = medicine.id | medicine_enzyme_interaction.enzyme_id = enzyme.id | 

### Response:

select count ( distinct fda_approved ) from medicine

### Instruction:

Convert text to sql: How many different FDA approval statuses exist for medicines? | medicine : id , name , trade_name , fda_approved | enzyme : id , name , location , product , chromosome , omim , porphyria | medicine_enzyme_interaction : enzyme_id , medicine_id , interaction_type | medicine_enzyme_interaction.medicine_id = medicine.id | medicine_enzyme_interaction.enzyme_id = enzyme.id | 

### Response:

select count ( distinct fda_approved ) from medicine

### Instruction:

Convert text to sql: Which enzyme names have the substring "ALA"? | medicine : id , name , trade_name , fda_approved | enzyme : id , name , location , product , chromosome , omim , porphyria | medicine_enzyme_interaction : enzyme_id , medicine_id , interaction_type | medicine_enzyme_interaction.medicine_id = medicine.id | medicine_enzyme_interaction.enzyme_id = enzyme.id | 

### Response:

select name from enzyme where name like '%ALA%'

### Instruction:

Convert text to sql: What are the names of enzymes that include the string 'ALA'? | medicine : id , name , trade_name , fda_approved | enzyme : id , name , location , product , chromosome , omim , porphyria | medicine_enzyme_interaction : enzyme_id , medicine_id , interaction_type | medicine_enzyme_interaction.medicine_id = medicine.id | medicine_enzyme_interaction.enzyme_id = enzyme.id | 

### Response:

select name from enzyme where name like '%ALA%'

### Instruction:

Convert text to sql: find the number of medicines offered by each trade. | medicine : id , name , trade_name , fda_approved | enzyme : id , name , location , product , chromosome , omim , porphyria | medicine_enzyme_interaction : enzyme_id , medicine_id , interaction_type | medicine_enzyme_interaction.medicine_id = medicine.id | medicine_enzyme_interaction.enzyme_id = enzyme.id | 

### Response:

select trade_name , count ( * ) from medicine group by trade_name
### Instruction:

Convert text to sql: How many medicines are offered by each trade name? | medicine : id , name , trade_name , fda_approved | enzyme : id , name , location , product , chromosome , omim , porphyria | medicine_enzyme_interaction : enzyme_id , medicine_id , interaction_type | medicine_enzyme_interaction.medicine_id = medicine.id | medicine_enzyme_interaction.enzyme_id = enzyme.id | 

### Response:

select trade_name , count ( * ) from medicine group by trade_name